| Conditions | 1 |
| Total Lines | 22 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | from coalib.bears.requirements.PackageRequirement import PackageRequirement |
||
| 10 | def __init__(self, package, version="", flag=""): |
||
| 11 | """ |
||
| 12 | Constructs a new ``JuliaRequirement``, using the ``PackageRequirement`` |
||
| 13 | constructor. |
||
| 14 | |||
| 15 | >>> pr = JuliaRequirement('"Pkg.add(\"Lint\")"', '19.2', '-e') |
||
| 16 | >>> pr.manager |
||
| 17 | 'julia' |
||
| 18 | >>> pr.package |
||
| 19 | '"Pkg.add(\"Lint\")"' |
||
| 20 | >>> pr.version |
||
| 21 | '19.2' |
||
| 22 | >>> pr.flag |
||
| 23 | '-e' |
||
| 24 | |||
| 25 | :param package: A string with the name of the package to be installed. |
||
| 26 | :param version: A version string. Leave empty to specify latest version. |
||
| 27 | :param flag: A string that specifies any additional flags, that |
||
| 28 | are passed to the manager. |
||
| 29 | """ |
||
| 30 | PackageRequirement.__init__(self, 'julia', package, version) |
||
| 31 | self.flag = flag |
||
| 32 |