Skip to content

Commit

Permalink
chore: modernize Ruff config
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
  • Loading branch information
henryiii committed Nov 6, 2023
1 parent e35a1f6 commit d3ea2ec
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions .ruff.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# --- General config ---
select = [
"E", "F", "W", # flake8
src = ["src"]
target-version = "py37"

# --- Linting config ---
[lint]
extend-select = [
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"C90", # McCabe cyclomatic complexity
Expand All @@ -22,19 +26,16 @@ select = [
"YTT", # flake8-2020
]
ignore = [
"E501", # line too long
"SIM105", # contextlib.supress (3.7 feature)
]
target-version = "py37"
src = ["src"]

[per-file-ignores]
[lint.per-file-ignores]
"tests/*" = ["S"] # Assert okay in tests

# --- Tool-related config ---

[isort]
[lint.isort]
known-third-party = ["validate_pyproject._vendor"]

[pylint]
[lint.pylint]
allow-magic-value-types = ["int", "str"]

0 comments on commit d3ea2ec

Please sign in to comment.