| Conditions | 1 |
| Total Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | from coalib.bears.requirements.PackageRequirement import PackageRequirement |
||
| 11 | def __init__(self, package, version=""): |
||
| 12 | """ |
||
| 13 | Constructs a new ``NpmRequirement``, using the ``PackageRequirement`` |
||
| 14 | constructor. |
||
| 15 | |||
| 16 | >>> pr = NpmRequirement('ramllint', '6.2') |
||
| 17 | >>> pr.manager |
||
| 18 | 'npm' |
||
| 19 | >>> pr.package |
||
| 20 | 'ramllint' |
||
| 21 | >>> pr.version |
||
| 22 | '6.2' |
||
| 23 | |||
| 24 | :param package: A string with the name of the package to be installed. |
||
| 25 | :param version: A version string. Leave empty to specify latest version. |
||
| 26 | """ |
||
| 27 | PackageRequirement.__init__(self, 'npm', package, version) |
||
| 28 | |||
| 47 |