We adopt the Google Python Style Guide with some modifications. This pylint checker is intended to enforce those conventions.
- Install with pip:
pip install aineko_style - Once installed you can either run it directly from the command line:
pylint --load-plugins=aineko_style.checker your_module.pyor add it to the pylint configuration file. Example:- pyproject.toml:
[tool.pylint.main] load-plugins = ["aineko_style.checker"]
- pylintrc:
[MAIN] load-plugins=aineko_style.checker
- pyproject.toml:
Warning Messages
| Message ID | Description | Message symbol |
|---|---|---|
| C0001 | Docstring contains types. Types should be part of the function definition. | docstring-contains-types |
Yes:
def message(index:int, content:str):
"""short description
Args:
index: The index of the message.
content: The content of the message.
"""
...No:
def message(index:int, content:str):
"""short description
Args:
index (int): The index of the message.
content (str): The content of the message.
"""
...