home-assistant-core/tests/ruff.toml
Marc Mueller 545b888034
Update ruff to 0.2.1 (#109796)
* Update ruff to 0.2.1

* Rename config sections

* Update remapped error codes

* Add ignores
2024-02-06 15:41:34 +01:00

40 lines
1.1 KiB
TOML

# This extend our general Ruff rules specifically for tests
extend = "../pyproject.toml"
[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()
"PT006", # Single parameter in parameterize is a string, multiple a tuple
"PT013", # Found incorrect pytest import, use simple import pytest instead
"PT015", # Assertion always fails, replace with pytest.fail()
"PT021", # use yield instead of request.addfinalizer
"PT022", # No teardown in fixture, replace useless yield with return
]
extend-ignore = [
"PLC", # pylint
"PLE", # pylint
"PLR", # pylint
"PLW", # pylint
"B904", # Use raise from to specify exception cause
"N815", # Variable {name} in class scope should not be mixedCase
]
[lint.isort]
known-first-party = [
"homeassistant",
"tests",
"script",
]
known-third-party = [
"syrupy",
"pytest",
"voluptuous",
"pylint",
]
forced-separate = [
"tests",
]