Skip to content

Commit

Permalink
Updated ruff config with ignores
Browse files Browse the repository at this point in the history
  • Loading branch information
fritzbrand committed Oct 8, 2024
1 parent 2a79d8d commit 736f157
Showing 1 changed file with 60 additions and 1 deletion.
61 changes: 60 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,65 @@ build-backend = "poetry.core.masonry.api"

[tool.ruff]
extend-exclude = [
"*/migrations/*.py"
"*/migrations/*.py",
"docs/conf.py",

]

[tool.ruff.lint]
select = [
"E", "F", "W", # pycodestyle + pyflakes == flake8 - mccabe
"I", # isort
"UP", # pyupgrade
"S", # flake8-bandit
"B", # flake8-bugbear
"C4", # flake8-comprehensions
# "DJ", # flake8-django
"PIE", # flake8-pie
# "PT", # flake8-pytest-style
"SIM", # flake8-simplify
"PTH", # flake8-use-pathlib
# "RUF", # ruff-specific rules
]
ignore = [
"E501", # TODO: Something about these long lines.
"S113", # TODO: Request timeouts.
"UP032", # TODO: Use f strings instead of format
"B904", # TODO: Fix exceptions raised in exception handlers.
"SIM102", # It's often more convenient/readable to use nested conditionals.
"SIM118", # TODO: Apply fixes for these
"SIM300", # TODO: Fix this, we must
"PIE804", # TODO: Use keyword args instead of **dict
"SIM105", # TODO: Replace this with contextlib.suppress
"S324", # TODO: Look into a fix for this
"UP012", # TODO: Decide whether to fix or ignore
"SIM210", # TODO: Fix these with bool()
"B006", # TODO: Fix mutable default
"C408", # TODO: Replace with dict literals
"S311", # TODO: Decide whether to fix or ignore
"C416", # TODO: Fix with list()
"B007", # TODO: Replace i with _i
"PTH118", # TODO: Switch to pathlib
"UP010", # TODO: Fix unnecessary future import

]

[tool.ruff.lint.per-file-ignores]
"**/tests/**" = [
"S101", # It's okay to use `assert` in tests.
"S106", # TODO: Silent these in place

]
"**/config/settings/{test,dev}.py" = [
"S104", # It's okay to bind to all interfaces in tests
"F405", # Its okay to import * in settings
"S105", # Its okay to have hardcoded secrets in test config


]
# TODO: Move this somewhere sensible?
"**/tests.py" = [
"S101", # It's okay to use `assert` in tests.
"S106", # TODO: Silent these in place

]

0 comments on commit 736f157

Please sign in to comment.