Skip to content

Commit

Permalink
chore: sync' ruff config
Browse files Browse the repository at this point in the history
  • Loading branch information
tumidi committed Oct 22, 2024
1 parent ea623f8 commit 64b64d8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ optional = true
[tool.ruff]
extend = "ruff_defaults.toml"

[tool.ruff.lint.extend-per-file-ignores]
# unused-async (aiohttp handlers must be async even if they don't use it)
"**/questionpy_server/web/**/*" = ["RUF029"]

[tool.pytest.ini_options]
# https://github.com/pytest-dev/pytest-asyncio#auto-mode
asyncio_mode = "auto"
Expand Down
10 changes: 6 additions & 4 deletions ruff_defaults.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ extend-select = [
]

ignore = [
# builtin-module-shadowing (relative module names such as 'abc' or 'types' are pretty normal)
"A005",

# allow async functions with timeout parameter
"ASYNC109",

# Relax on missing docstrings
"D1",

Expand Down Expand Up @@ -102,17 +108,13 @@ ignore = [
# ruff doesn't track inheritance across files, disabling to prevent false positives
# https://github.com/astral-sh/ruff/issues/5243#issuecomment-1860862939
"RUF012",
"A005", # builtin-module-shadowing (relative module names such as 'abc' or 'types' are pretty normal)
"ASYNC109" # async-function-with-timeout
]

pydocstyle = { convention = "google" }

[lint.per-file-ignores]
"**/scripts/*" = ["INP001", "T201"]
"**/tests/**/*" = ["PLC1901", "PLC2701", "PLR2004", "S", "TID252", "FBT"]
# unused-async (aiohttp handlers must be async even if they don't use it)
"questionpy_server/web/**/*" = ["RUF029"]

[lint.flake8-builtins]
# help: (guess it's ok since built-in `help()` is for interactive use and no collisions are expected)
Expand Down

0 comments on commit 64b64d8

Please sign in to comment.