| Total Complexity | 3 |
| Total Lines | 10 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | class PackageRequirement: |
||
| 23 | class PythonRequirement(PackageRequirement): |
||
| 24 | |||
| 25 | def __init__(self, package, version): |
||
| 26 | PackageRequirement.__init__(self, 'pip', package, version) |
||
| 27 | |||
| 28 | def __str__(self): |
||
| 29 | return "{.package} version {.version}".format(self) |
||
| 30 | |||
| 31 | def multiple(self, *args): |
||
|
|
|||
| 32 | return args |
||
| 33 |
If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example
could be written as