pylint config: enable "missing-function-docstring"
#1929 aperta il 30 dic 2021
Metriche repository
- Star
- (2629 stelle)
- Metriche merge PR
- (Nessuna PR mergiata in 30 g)
Descrizione
We enabled pylint in the project, however several code style violations already exist. There's no point in enabling rules and then not enforcing them, therefore any rule that is not already enforced is currently disabled.
One of these rules if the one you can see in the title is this issue.
How to solve Create a pull request with 2 commits. The commits should:
- Enable the rule in pylintrc (see this commit for an example)
- Make sure that the CI still passes after creating your pull requests. If the CI fails due to the violations of the rule you've just enabled, then fix the code style mistake in the code and create a new commit. (see this commit for an example)
Take a look at this MR to see how your pull request should look: https://github.com/kantord/LibreLingo/pull/1895
Another (bigger) example of a similar pull request: https://github.com/kantord/LibreLingo/pull/1893
An example of how to write your commit messages:
Why solve like this I have considered keeping the rules enabled but allowing the CI to pass with a certain number of pylint rule violations. I don't like this approach though, because it results in a very long and polluted output in pylint, which would render the output unusable for practical purposes.
Additional context This is a good first issue because it will likely take little time to fix, and it does not require knowledge of LibreLingo or the project structure. It also does not require you to be an expert in
Some things you might find useful:
- How to set up the project locally: https://librelingo.app/docs/#setting-up-the-development-environment
- How to run pylint locally:
poetry run pylint $(git ls-files '*.py') - How to fix code style issues with
black. This can be useful to fix indentation after you changed the code:poetry run black apps - Where we store our pylint config: https://github.com/kantord/LibreLingo/blob/main/pylintrc