| Total Complexity | 3 |
| Total Lines | 15 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | class PackageRequirement: |
||
| 23 | class PythonRequirement(PackageRequirement): |
||
| 24 | |||
| 25 | def __init__(self, package: str, version): |
||
|
|
|||
| 26 | """ |
||
| 27 | :param package: A string with the name of the package to be installed. |
||
| 28 | :param version: A number that contains the version. |
||
| 29 | """ |
||
| 30 | self.package = package |
||
| 31 | self.version = version |
||
| 32 | |||
| 33 | def __str__(self): |
||
| 34 | return "{.package} version {.version}".format(self) |
||
| 35 | |||
| 36 | def multiple(self, *args): |
||
| 37 | return args |
||
| 38 |
It is generally advisable to initialize the super-class by calling its
__init__method: