Skip to content

Commit

Permalink
fix #417 switch to ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
lucemia committed Feb 11, 2025
1 parent 3ca5348 commit 6c2d4a4
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ griffe_inherited_docstrings = "*"
black = "*"
ipykernel = "^6.29.4"
mknotebooks = "*"
ruff = "^0.9.6"

[tool.mypy]
exclude = "^(migrations|commands|sandbox|samples|sdk)/"
Expand All @@ -101,3 +102,33 @@ pattern = "default-unprefixed"
[build-system]
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"]
build-backend = "poetry_dynamic_versioning.backend"

[tool.ruff] # https://docs.astral.sh/ruff/settings/#top-level
line-length = 88
exclude = ["**/cassettes/", "**/__snapshots__/"]
src = ["src"]

[tool.ruff.lint] # https://docs.astral.sh/ruff/settings/#lint
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
# "B", # flake8-bugbear
"B006", # flake8-bugbear: Do not use mutable data structures for argument defaults
"C4", # flake8-comprehensions
"UP", # pyupgrade
]
ignore = [
"E741", # Ambiguous variable name: `I`
"E501", # Line too long
"E402", # Module level import not at top of file
"E712", # not work for pandas
"F811", # FIXME: we relay on it to share fixture across app
]
[tool.ruff.lint.isort]
required-imports = ["from __future__ import annotations"]

[tool.ruff.format] # https://docs.astral.sh/ruff/settings/#format
quote-style = "double" # 引號風格,雙引號是預設值
docstring-code-format = true

0 comments on commit 6c2d4a4

Please sign in to comment.