Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DEV: Add Import Sorting & Extra Flake8 Rules (#141)
Add many extra checks to pre-commit, some of which are the same as those used by deepsource. Proposed new additions to pre-commit: - isort: Sort and group imports (stdlibrary, 3rd party, current package) - flake8-isort: Check import ordering - flake8-comprehensions: Suggestions for better comprehensions - flake8-mutable: Check for mutable default arguments - flake8-use-fstring: Use of f-strings vs old style format strings - flake8-simplify: Suggestions to simplify code - pep8-naming: Check PEP8 class naming - flake8-eradicate: Find dead/commented out code - flake8-builtins: Check for built-ins being used as variables - flake8-cognitive-complexity: Check max function complexity - flake8-expression-complexity: Check max expression complexity - flake8-return: Check return statements (no redundant assignments) - flake8-spellcheck: Spelling checker (comments only) - flake8-pytest-style: Check against pytest style guide - flake8-fixme: Check for FIXME, TODO, and XXX left in comments - flake8-sql: Check SQL statement style - nitpick: Check that black, flake8, isort have compaible options - flake8-logging-format: Validate (lack of) logging format strings - flake8-pie: Misc. linting rules Co-authored by: @John-P
- Loading branch information