Conditions | 1 |
Total Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | class PackageRequirement: |
||
3 | def __init__(self, manager: str, package: str, version: str): |
||
4 | """ |
||
5 | :param manager: A string with the name of the manager (pip, npm, etc). |
||
6 | :param package: A string with the name of the package to be installed. |
||
7 | :param version: A number that contains the version. |
||
8 | """ |
||
9 | self.manager = manager |
||
10 | self.package = package |
||
11 | self.version = version |
||
12 | |||
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