Total Complexity | 3 |
Total Lines | 10 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | from coala_decorators.decorators import generate_repr |
||
24 | class PythonRequirement(PackageRequirement): |
||
25 | |||
26 | def __init__(self, package, version): |
||
27 | PackageRequirement.__init__(self, 'pip', package, version) |
||
28 | |||
29 | def __str__(self): |
||
30 | return "{.package} version {.version}".format(self) |
||
31 | |||
32 | def multiple(self, *args): |
||
|
|||
33 | return args |
||
34 |
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