Skip to content

Conversation

@arm4b
Copy link
Contributor

@arm4b arm4b commented Sep 8, 2022

This PR adds Pylint https://pylint.pycqa.org/en/latest/ as a static code analyser for the Python codebase, for quick spotting the common mistakes, errors and enhancing the python coding standards in a minimal automated way.

With #297, closes #271

Quick run:

pip3 install tox
tox -e pylint

Silence for now, refactor this function in the future.
Fix pylint R0914: Too many local variables (23/15) (too-many-locals)
See: #327
Silence for now, refactor this function in the future.
> R0914: Too many local variables (36/15) (too-many-locals)
> R0912: Too many branches (19/12) (too-many-branches)
> R0915: Too many statements (104/50) (too-many-statements)

See: #328
arm4b added 2 commits October 20, 2022 18:40
Silence for now, refactor this function in the future.
> R0914: Too many local variables (22/15) (too-many-locals)
> R0915: Too many statements (59/50) (too-many-statements)

See: #329
@arm4b arm4b marked this pull request as ready for review October 20, 2022 17:41
@arm4b arm4b added the refactor label Oct 20, 2022
@arm4b
Copy link
Contributor Author

arm4b commented Oct 20, 2022

The overall cosmetic pylint refactoring is done and pylint check is now succeeding and is part of the CI.

However, some parts of the codebase will need more structural rework like extracting some huge functions into classes.
We temporary silence them for now to make pylint pass and make dedicated Issues to address them in the future:

^^ these would be also good first issues/PRs easier to tackle in between the tasks.

@arm4b arm4b requested a review from PhillypHenning October 20, 2022 21:01
@arm4b arm4b added this to the v2.2.0 milestone Oct 31, 2022
@arm4b arm4b merged commit 1180052 into main Oct 31, 2022
@arm4b arm4b deleted the feature/pylint branch October 31, 2022 18:47
@arm4b arm4b mentioned this pull request Oct 31, 2022
2 tasks
PhillypHenning pushed a commit that referenced this pull request Nov 4, 2022
…directly (#345)

* add masking functions to be called in logger and directly

* black formating

* move logging masks to settings

* fix linting error

* black formating

* more linting errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Code Linting (Python)

2 participants