-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Use ruff in CI * Fix lint errors
- Loading branch information
Showing
15 changed files
with
162 additions
and
147 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
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 was deleted.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
[tool.pytest.ini_options] | ||
asyncio_mode = "strict" | ||
|
||
[tool.mypy] | ||
python_version = "3.10" | ||
show_error_codes = true | ||
follow_imports = "silent" | ||
ignore_missing_imports = true | ||
warn_incomplete_stub = true | ||
warn_redundant_casts = true | ||
warn_unused_configs = true | ||
check_untyped_defs = true | ||
disallow_incomplete_defs = true | ||
disallow_subclassing_any = true | ||
disallow_untyped_calls = true | ||
disallow_untyped_decorators = true | ||
disallow_untyped_defs = true | ||
no_implicit_optional = true | ||
strict_equality = true | ||
warn_return_any = true | ||
warn_unused_ignores = true | ||
warn_unreachable = true | ||
|
||
[tool.ruff] | ||
target-version = "py310" | ||
|
||
select = [ | ||
"A", # flake8-builtins | ||
"ARG", # flake8-unused-arguments | ||
"B", # flake8-bugbear | ||
"BLE", # flake8-blind-except | ||
"C", # complexity | ||
"C4", # flake8-comprehensions | ||
"C90", # mccabe | ||
"D", # docstrings | ||
"DJ", # flake8-django | ||
"DTZ", # flake8-datetimez | ||
"E", # pycodestyle | ||
"ERA", # eradicate | ||
"EXE", # flake8-executable | ||
"F", # pyflakes/autoflake | ||
"FBT", # flake8-boolean-trap | ||
"G", # flake8-logging-format | ||
"I", # isort | ||
"ICN", # flake8-import-conventions | ||
"INP", # flake8-no-pep420 | ||
"ISC", # flake8-implicit-str-concat | ||
"N", # pep8-naming | ||
"NPY", # NumPy-specific rules | ||
"PD", # pandas-vet | ||
"PGH", # pygrep-hooks | ||
"PIE", # flake8-pie | ||
"PL", # Pylint | ||
"PT", # flake8-pytest-style | ||
"PYI", # flake8-pyi | ||
"Q", # flake8-quotes | ||
"RET", # flake8-return | ||
"RSE", # flake8-raise | ||
"RUF", # Ruff-specific rules | ||
"S", # flake8-bandit | ||
"SIM", # flake8-simplify | ||
"SLF", # flake8-self | ||
"T10", # flake8-debugger | ||
"T20", # flake8-print | ||
"TID", # flake8-tidy-imports | ||
"TRY", # tryceratops | ||
"UP", # pyupgrade | ||
"W", # pycodestyle | ||
"YTT", # flake8-2020 | ||
] | ||
|
||
ignore = [ | ||
"D203", # 1 blank line required before class docstring | ||
"D213", # Multi-line docstring summary should start at the second line | ||
"D404", # First word of the docstring should not be This | ||
"D406", # Section name should end with a newline | ||
"D407", # Section name underlining | ||
"D411", # Missing blank line before section | ||
"E731", # Do not assign a lambda expression, use a def | ||
"FBT001", # Boolean positional arg in function definition | ||
"PLR0912", # Too many branches | ||
"PLR0915", # Too many statements | ||
"PT023", # Use `@pytest.mark.asyncio()` over `@pytest.mark.asyncio` | ||
"TRY003", # Avoid specifying long messages outside the exception class | ||
] | ||
|
||
[tool.ruff.per-file-ignores] | ||
"const.py" = [ | ||
"E501", # Line too long | ||
"S105", # Possible hardcoded password | ||
] | ||
"model.py" = [ | ||
"ARG004", # Unused static method argument | ||
"S105", # Possible hardcoded password | ||
] | ||
"tests/*" = [ | ||
"FBT003", # Boolean positional value in function call | ||
"PLR2004", # Magic value used in comparison | ||
"S101", # Use of `assert` detected | ||
] | ||
"example.py" = [ | ||
"ERA001", # Found commented-out code | ||
"T201", # `print` found | ||
] | ||
|
||
[tool.ruff.pyupgrade] | ||
keep-runtime-typing = true | ||
|
||
[tool.ruff.mccabe] | ||
max-complexity = 25 | ||
|
||
[tool.coverage.run] | ||
source = ["gios"] |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
-r requirements.txt | ||
-r requirements-test.txt | ||
pre-commit==3.0.4 | ||
setuptools>=65.5.1 # not directly required, pinned by Snyk to avoid a vulnerability | ||
|
||
-e . | ||
setuptools>=65.5.1 # not directly required, pinned by Snyk to avoid a vulnerability |
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 |
---|---|---|
@@ -1,14 +1,10 @@ | ||
aioresponses==0.7.4 | ||
black==23.1.0 | ||
coverage==7.1.0 | ||
flake8==6.0.0 | ||
isort==5.12.0 | ||
mypy==1.0.1 | ||
pydocstyle==6.3.0 | ||
pylint_strict_informational==0.1 | ||
pylint==2.16.2 | ||
pytest-asyncio==0.20.3 | ||
pytest-cov==4.0.0 | ||
pytest-error-for-skips==2.0.2 | ||
pytest-timeout==2.1.0 | ||
pytest==7.2.1 | ||
pytest==7.2.1 | ||
ruff==0.0.247 |
Oops, something went wrong.