-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Replace black, flake8, isort & pydocstyle with Ruff (#47)
# Description * Replaces black, flake8, pydocstyle & isort with Ruff * Adds `.pre-commit-config.yaml` file * Fix some linting issues highlighted by Ruff in default setting, while disabling a 5 rules. The following rules are disabled: - ANN001 - ANN401 - S608 - SLF001 - EM101 `ANN001` * `ANN401` are disabled because the codebase has a few instances where params / return values don't specify type or return `Any`. `S608` flags string based queries. It will require a deeper refactor to leverage sqlalchemy exclusively. `SFL001` flags accesses to private members. This is done to patch `_confirm_primitive_property`. `EM101` flags strings passed to Exceptions, which I felt was safe to do. closes: #43 --------- Co-authored-by: Edgar Ramírez Mondragón <[email protected]>
- Loading branch information
1 parent
c519d8e
commit 38c8cc5
Showing
7 changed files
with
163 additions
and
224 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.6.0 | ||
hooks: | ||
- id: check-json | ||
- id: check-toml | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
|
||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.6.7 | ||
hooks: | ||
- id: ruff | ||
args: [--fix, --exit-non-zero-on-fix] | ||
- id: ruff-format | ||
|
||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v1.11.2 | ||
hooks: | ||
- id: mypy |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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.