Skip to content

Commit

Permalink
Update ruff settings.
Browse files Browse the repository at this point in the history
  • Loading branch information
denpamusic committed Feb 12, 2024
1 parent 4e02655 commit d185ba2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
9 changes: 4 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ select = [
"B014", # Exception handler with duplicate exception
"B023", # Function definition does not bind loop variable {name}
"B026", # Star-arg unpacking after a keyword argument is strongly discouraged
"B904", # Use raise from to specify exception cause
"C", # complexity
"COM818", # Trailing comma on bare tuple prohibited
"D", # docstrings
Expand All @@ -153,7 +154,6 @@ select = [
"N804", # First argument of a class method should be named cls
"N805", # First argument of a method should be named self
"N815", # Variable {name} in class scope should not be mixedCase
"PGH001", # No builtin eval() allowed
"PGH004", # Use specific rule codes when using noqa
"PLC0414", # Useless import alias. Import alias does not rename original package.
"PLC", # pylint
Expand Down Expand Up @@ -192,7 +192,6 @@ select = [
"T20", # flake8-print
"TID251", # Banned imports
"TRY004", # Prefer TypeError exception for invalid type
"TRY200", # Use raise from to specify exception cause
"TRY302", # Remove exception handler; error is immediately re-raised
"UP", # pyupgrade
"W", # pycodestyle
Expand All @@ -210,18 +209,18 @@ indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"

[tool.ruff.isort]
[tool.ruff.lint.isort]
force-sort-within-sections = true
known-first-party = [
"pyplumio",
]
combine-as-imports = true
split-on-trailing-comma = false

[tool.ruff.mccabe]
[tool.ruff.lint.mccabe]
max-complexity = 25

[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]

# Allow print in main
"pyplumio/__main__.py" = ["T201"]
Expand Down
4 changes: 2 additions & 2 deletions tests/ruff.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
extend = "../pyproject.toml"

extend-select = [
lint.extend-select = [
"PT001", # Use @pytest.fixture without parentheses
"PT002", # Configuration for fixture specified via positional args, use kwargs
"PT003", # The scope='function' is implied in @pytest.fixture()
Expand All @@ -11,6 +11,6 @@ extend-select = [
"PT022", # No teardown in fixture, replace useless yield with return
]

extend-ignore = [
lint.extend-ignore = [
"PLR2004", # Magic value used in comparison
]

0 comments on commit d185ba2

Please sign in to comment.