diff --git a/pyproject.toml b/pyproject.toml index df3d1fa..fd63ca9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ target-version = "py311" line-length = 127 -select = [ +lint.select = [ "B002", # Python does not support the unary prefix increment "B007", # Loop control variable {name} not used within loop body "B014", # Exception handler with duplicate exception @@ -20,7 +20,7 @@ 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 + "S307", # "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 @@ -58,13 +58,13 @@ select = [ "T100", # Trace found: {name} used "T20", # flake8-print "TRY004", # Prefer TypeError exception for invalid type - "TRY200", # Use raise from to specify exception cause + "B904", # "TRY200", # Use raise from to specify exception cause "TRY302", # Remove exception handler; error is immediately re-raised "UP", # pyupgrade "W", # pycodestyle ] -ignore = [ +lint.ignore = [ "D202", # No blank lines allowed after function docstring "D203", # 1 blank line required before class docstring "D213", # Multi-line docstring summary should start at the second line @@ -88,34 +88,34 @@ ignore = [ "UP038", # Use `X | Y` in `isinstance` call instead of `(X, Y)` ] -[tool.ruff.flake8-pytest-style] +[tool.ruff.lint.flake8-pytest-style] fixture-parentheses = false -[tool.ruff.isort] +[tool.ruff.lint.isort] # force-sort-within-sections = true # combine-as-imports = true -[tool.ruff.per-file-ignores] +[tool.ruff.lint.per-file-ignores] # Allow for main entry & scripts to write to stdout "script/*" = ["T20"] -[tool.ruff.mccabe] +[tool.ruff.lint.mccabe] max-complexity = 25 -[tool.ruff.pycodestyle] +[tool.ruff.lint.pycodestyle] ignore-overlong-task-comments = true max-doc-length = 127 -[tool.ruff.pydocstyle] +[tool.ruff.lint.pydocstyle] convention = "google" -[tool.ruff.flake8-import-conventions.extend-aliases] +[tool.ruff.lint.flake8-import-conventions.extend-aliases] voluptuous = "vol" "homeassistant.helpers.config_validation" = "cv" "homeassistant.helpers.entity_registry" = "er" -[tool.isort] +[tool.lint.isort] profile = "black" combine-as-imports = true split-on-trailing-comma = false