Closed sstanovnik closed 3 years ago
If possible, this needs to be merged before doing anything else, otherwise there will be many ugly merge conflicts. It's a perfect time though, seeing as there are no open pull requests at the moment.
setup.cfg
or requirements.txt
. I don't dare touch Pipfile
in that way, because I have no idea how it works :)pipenv
and Pipfile
to something else.
To help prevent preventable coding errors and to unify code style, we introduce almost all standard linting and static analysis tools applicable to this project:
This is accompanied by editorconfig, which makes it easier for IDEs to adhere to the styles.
Configurations of different tools are set so that their overlapping checks, such as line lengths, are identical. Static typing is relaxed enough to not require major changes in the codebase (such as requiring all variables to be explicitly typed), as well as other linter configurations, which mostly adhere to the style this project has used before.
CI is updated to perform sanity checks as part of its testing routine. A helper script exists to run all sanity checks at once, as a batch, only exiting with an error code at the end, which simplifies CI execution.
Touches nearly every file in the repository to adhere to sanity checks, most notably:
This uncovered some bad code that was corrected, such as unreachable branches, plain incorrect logic, use of deprecated and insecure functions etc.
Closes #163.