-
Notifications
You must be signed in to change notification settings - Fork 305
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable Pylint in CI and fix its errors
The main fixes were: * Specify encoding for all file opens. By default it depends on environment variables which is bad. * Use `with` to open files. Otherwise they don't necessarily get closed. There were also a few minor things like using `enumerate`, not using objects as default arguments, etc. In some cases I slightly refactored the code.
- Loading branch information
Showing
12 changed files
with
191 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
[MAIN] | ||
py-version = 3.9.0 | ||
disable= | ||
# Allow 'TODO:' in code. | ||
fixme, | ||
# Overly zealous duplicate code detection. | ||
duplicate-code, | ||
# These debatable style lints are quite annoying, and often push | ||
# you into mixing up small changes (adding one statement to a function) | ||
# with large refactors (splitting the function up into shorter functions). | ||
too-few-public-methods, | ||
too-many-arguments, | ||
too-many-positional-arguments, | ||
too-many-branches, | ||
too-many-instance-attributes, | ||
too-many-locals, | ||
too-many-return-statements, | ||
too-many-statements, | ||
# Handled by Black. | ||
line-too-long, | ||
# This is technically correct but not that important. | ||
logging-fstring-interpolation, | ||
# TODO: These should be enabled but writing documentation for | ||
# all of the code is not feasible in one go. | ||
missing-module-docstring, | ||
missing-function-docstring, | ||
missing-class-docstring, | ||
|
||
# These names are fine when used sensibly. Without listing them here | ||
# Pylint will complain they are too short. | ||
good-names=c,i,j,k,id,pc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.