1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2026-02-14 23:19:37 +00:00

Reformat pyproject.toml using taplo (#6550)

Reformat pyproject.toml using taplo. This aligns formatting with Home
Assistant Core.
This commit is contained in:
Stefan Agner
2026-02-11 09:56:00 +01:00
committed by GitHub
parent 327a2fe6b1
commit 7e91cfe01c

View File

@@ -9,7 +9,7 @@ license = { text = "Apache-2.0" }
description = "Open-source private cloud os for Home-Assistant based on HassOS" description = "Open-source private cloud os for Home-Assistant based on HassOS"
readme = "README.md" readme = "README.md"
authors = [ authors = [
{ name = "The Home Assistant Authors", email = "hello@home-assistant.io" }, { name = "The Home Assistant Authors", email = "hello@home-assistant.io" },
] ]
keywords = ["docker", "home-assistant", "api"] keywords = ["docker", "home-assistant", "api"]
requires-python = ">=3.13.0" requires-python = ">=3.13.0"
@@ -53,154 +53,154 @@ good-names = ["id", "i", "j", "k", "ex", "Run", "_", "fp", "T", "os"]
# too-few-* - same as too-many-* # too-few-* - same as too-many-*
# unused-argument - generic callbacks and setup methods create a lot of warnings # unused-argument - generic callbacks and setup methods create a lot of warnings
disable = [ disable = [
"format", "format",
"abstract-method", "abstract-method",
"cyclic-import", "cyclic-import",
"duplicate-code", "duplicate-code",
"locally-disabled", "locally-disabled",
"no-else-return", "no-else-return",
"not-context-manager", "not-context-manager",
"too-few-public-methods", "too-few-public-methods",
"too-many-arguments", "too-many-arguments",
"too-many-branches", "too-many-branches",
"too-many-instance-attributes", "too-many-instance-attributes",
"too-many-lines", "too-many-lines",
"too-many-locals", "too-many-locals",
"too-many-public-methods", "too-many-public-methods",
"too-many-return-statements", "too-many-return-statements",
"too-many-statements", "too-many-statements",
"unused-argument", "unused-argument",
"consider-using-with", "consider-using-with",
# Handled by ruff # Handled by ruff
# Ref: <https://github.com/astral-sh/ruff/issues/970> # Ref: <https://github.com/astral-sh/ruff/issues/970>
"await-outside-async", # PLE1142 "await-outside-async", # PLE1142
"bad-str-strip-call", # PLE1310 "bad-str-strip-call", # PLE1310
"bad-string-format-type", # PLE1307 "bad-string-format-type", # PLE1307
"bidirectional-unicode", # PLE2502 "bidirectional-unicode", # PLE2502
"continue-in-finally", # PLE0116 "continue-in-finally", # PLE0116
"duplicate-bases", # PLE0241 "duplicate-bases", # PLE0241
"format-needs-mapping", # F502 "format-needs-mapping", # F502
"function-redefined", # F811 "function-redefined", # F811
# Needed because ruff does not understand type of __all__ generated by a function # Needed because ruff does not understand type of __all__ generated by a function
# "invalid-all-format", # PLE0605 # "invalid-all-format", # PLE0605
"invalid-all-object", # PLE0604 "invalid-all-object", # PLE0604
"invalid-character-backspace", # PLE2510 "invalid-character-backspace", # PLE2510
"invalid-character-esc", # PLE2513 "invalid-character-esc", # PLE2513
"invalid-character-nul", # PLE2514 "invalid-character-nul", # PLE2514
"invalid-character-sub", # PLE2512 "invalid-character-sub", # PLE2512
"invalid-character-zero-width-space", # PLE2515 "invalid-character-zero-width-space", # PLE2515
"logging-too-few-args", # PLE1206 "logging-too-few-args", # PLE1206
"logging-too-many-args", # PLE1205 "logging-too-many-args", # PLE1205
"missing-format-string-key", # F524 "missing-format-string-key", # F524
"mixed-format-string", # F506 "mixed-format-string", # F506
"no-method-argument", # N805 "no-method-argument", # N805
"no-self-argument", # N805 "no-self-argument", # N805
"nonexistent-operator", # B002 "nonexistent-operator", # B002
"nonlocal-without-binding", # PLE0117 "nonlocal-without-binding", # PLE0117
"not-in-loop", # F701, F702 "not-in-loop", # F701, F702
"notimplemented-raised", # F901 "notimplemented-raised", # F901
"return-in-init", # PLE0101 "return-in-init", # PLE0101
"return-outside-function", # F706 "return-outside-function", # F706
"syntax-error", # E999 "syntax-error", # E999
"too-few-format-args", # F524 "too-few-format-args", # F524
"too-many-format-args", # F522 "too-many-format-args", # F522
"too-many-star-expressions", # F622 "too-many-star-expressions", # F622
"truncated-format-string", # F501 "truncated-format-string", # F501
"undefined-all-variable", # F822 "undefined-all-variable", # F822
"undefined-variable", # F821 "undefined-variable", # F821
"used-prior-global-declaration", # PLE0118 "used-prior-global-declaration", # PLE0118
"yield-inside-async-function", # PLE1700 "yield-inside-async-function", # PLE1700
"yield-outside-function", # F704 "yield-outside-function", # F704
"anomalous-backslash-in-string", # W605 "anomalous-backslash-in-string", # W605
"assert-on-string-literal", # PLW0129 "assert-on-string-literal", # PLW0129
"assert-on-tuple", # F631 "assert-on-tuple", # F631
"bad-format-string", # W1302, F "bad-format-string", # W1302, F
"bad-format-string-key", # W1300, F "bad-format-string-key", # W1300, F
"bare-except", # E722 "bare-except", # E722
"binary-op-exception", # PLW0711 "binary-op-exception", # PLW0711
"cell-var-from-loop", # B023 "cell-var-from-loop", # B023
# "dangerous-default-value", # B006, ruff catches new occurrences, needs more work # "dangerous-default-value", # B006, ruff catches new occurrences, needs more work
"duplicate-except", # B014 "duplicate-except", # B014
"duplicate-key", # F601 "duplicate-key", # F601
"duplicate-string-formatting-argument", # F "duplicate-string-formatting-argument", # F
"duplicate-value", # F "duplicate-value", # F
"eval-used", # PGH001 "eval-used", # PGH001
"exec-used", # S102 "exec-used", # S102
# "expression-not-assigned", # B018, ruff catches new occurrences, needs more work # "expression-not-assigned", # B018, ruff catches new occurrences, needs more work
"f-string-without-interpolation", # F541 "f-string-without-interpolation", # F541
"forgotten-debug-statement", # T100 "forgotten-debug-statement", # T100
"format-string-without-interpolation", # F "format-string-without-interpolation", # F
# "global-statement", # PLW0603, ruff catches new occurrences, needs more work # "global-statement", # PLW0603, ruff catches new occurrences, needs more work
"global-variable-not-assigned", # PLW0602 "global-variable-not-assigned", # PLW0602
"implicit-str-concat", # ISC001 "implicit-str-concat", # ISC001
"import-self", # PLW0406 "import-self", # PLW0406
"inconsistent-quotes", # Q000 "inconsistent-quotes", # Q000
"invalid-envvar-default", # PLW1508 "invalid-envvar-default", # PLW1508
"keyword-arg-before-vararg", # B026 "keyword-arg-before-vararg", # B026
"logging-format-interpolation", # G "logging-format-interpolation", # G
"logging-fstring-interpolation", # G "logging-fstring-interpolation", # G
"logging-not-lazy", # G "logging-not-lazy", # G
"misplaced-future", # F404 "misplaced-future", # F404
"named-expr-without-context", # PLW0131 "named-expr-without-context", # PLW0131
"nested-min-max", # PLW3301 "nested-min-max", # PLW3301
# "pointless-statement", # B018, ruff catches new occurrences, needs more work # "pointless-statement", # B018, ruff catches new occurrences, needs more work
"raise-missing-from", # TRY200 "raise-missing-from", # TRY200
# "redefined-builtin", # A001, ruff is way more stricter, needs work # "redefined-builtin", # A001, ruff is way more stricter, needs work
"try-except-raise", # TRY203 "try-except-raise", # TRY203
"unused-argument", # ARG001, we don't use it "unused-argument", # ARG001, we don't use it
"unused-format-string-argument", #F507 "unused-format-string-argument", #F507
"unused-format-string-key", # F504 "unused-format-string-key", # F504
"unused-import", # F401 "unused-import", # F401
"unused-variable", # F841 "unused-variable", # F841
"useless-else-on-loop", # PLW0120 "useless-else-on-loop", # PLW0120
"wildcard-import", # F403 "wildcard-import", # F403
"bad-classmethod-argument", # N804 "bad-classmethod-argument", # N804
"consider-iterating-dictionary", # SIM118 "consider-iterating-dictionary", # SIM118
"empty-docstring", # D419 "empty-docstring", # D419
"invalid-name", # N815 "invalid-name", # N815
"line-too-long", # E501, disabled globally "line-too-long", # E501, disabled globally
"missing-class-docstring", # D101 "missing-class-docstring", # D101
"missing-final-newline", # W292 "missing-final-newline", # W292
"missing-function-docstring", # D103 "missing-function-docstring", # D103
"missing-module-docstring", # D100 "missing-module-docstring", # D100
"multiple-imports", #E401 "multiple-imports", #E401
"singleton-comparison", # E711, E712 "singleton-comparison", # E711, E712
"subprocess-run-check", # PLW1510 "subprocess-run-check", # PLW1510
"superfluous-parens", # UP034 "superfluous-parens", # UP034
"ungrouped-imports", # I001 "ungrouped-imports", # I001
"unidiomatic-typecheck", # E721 "unidiomatic-typecheck", # E721
"unnecessary-direct-lambda-call", # PLC3002 "unnecessary-direct-lambda-call", # PLC3002
"unnecessary-lambda-assignment", # PLC3001 "unnecessary-lambda-assignment", # PLC3001
"unneeded-not", # SIM208 "unneeded-not", # SIM208
"useless-import-alias", # PLC0414 "useless-import-alias", # PLC0414
"wrong-import-order", # I001 "wrong-import-order", # I001
"wrong-import-position", # E402 "wrong-import-position", # E402
"comparison-of-constants", # PLR0133 "comparison-of-constants", # PLR0133
"comparison-with-itself", # PLR0124 "comparison-with-itself", # PLR0124
# "consider-alternative-union-syntax", # UP007, typing extension # "consider-alternative-union-syntax", # UP007, typing extension
"consider-merging-isinstance", # PLR1701 "consider-merging-isinstance", # PLR1701
# "consider-using-alias", # UP006, typing extension # "consider-using-alias", # UP006, typing extension
"consider-using-dict-comprehension", # C402 "consider-using-dict-comprehension", # C402
"consider-using-generator", # C417 "consider-using-generator", # C417
"consider-using-get", # SIM401 "consider-using-get", # SIM401
"consider-using-set-comprehension", # C401 "consider-using-set-comprehension", # C401
"consider-using-sys-exit", # PLR1722 "consider-using-sys-exit", # PLR1722
"consider-using-ternary", # SIM108 "consider-using-ternary", # SIM108
"literal-comparison", # F632 "literal-comparison", # F632
"property-with-parameters", # PLR0206 "property-with-parameters", # PLR0206
"super-with-arguments", # UP008 "super-with-arguments", # UP008
"too-many-branches", # PLR0912 "too-many-branches", # PLR0912
"too-many-return-statements", # PLR0911 "too-many-return-statements", # PLR0911
"too-many-statements", # PLR0915 "too-many-statements", # PLR0915
"trailing-comma-tuple", # COM818 "trailing-comma-tuple", # COM818
"unnecessary-comprehension", # C416 "unnecessary-comprehension", # C416
"use-a-generator", # C417 "use-a-generator", # C417
"use-dict-literal", # C406 "use-dict-literal", # C406
"use-list-literal", # C405 "use-list-literal", # C405
"useless-object-inheritance", # UP004 "useless-object-inheritance", # UP004
"useless-return", # PLR1711 "useless-return", # PLR1711
# "no-self-use", # PLR6301 # Optional plugin, not enabled # "no-self-use", # PLR6301 # Optional plugin, not enabled
] ]
[tool.pylint.REPORTS] [tool.pylint.REPORTS]
@@ -226,120 +226,120 @@ log_date_format = "%Y-%m-%d %H:%M:%S"
asyncio_default_fixture_loop_scope = "function" asyncio_default_fixture_loop_scope = "function"
asyncio_mode = "auto" asyncio_mode = "auto"
filterwarnings = [ filterwarnings = [
"error", "error",
"ignore:pkg_resources is deprecated as an API:DeprecationWarning:dirhash", "ignore:pkg_resources is deprecated as an API:DeprecationWarning:dirhash",
"ignore::pytest.PytestUnraisableExceptionWarning", "ignore::pytest.PytestUnraisableExceptionWarning",
] ]
markers = [ markers = [
"no_mock_init_websession: disable the autouse mock of init_websession for this test", "no_mock_init_websession: disable the autouse mock of init_websession for this test",
] ]
[tool.ruff] [tool.ruff]
lint.select = [ lint.select = [
"B002", # Python does not support the unary prefix increment "B002", # Python does not support the unary prefix increment
"B007", # Loop control variable {name} not used within loop body "B007", # Loop control variable {name} not used within loop body
"B014", # Exception handler with duplicate exception "B014", # Exception handler with duplicate exception
"B023", # Function definition does not bind loop variable {name} "B023", # Function definition does not bind loop variable {name}
"B026", # Star-arg unpacking after a keyword argument is strongly discouraged "B026", # Star-arg unpacking after a keyword argument is strongly discouraged
"B904", # Use raise from to specify exception cause "B904", # Use raise from to specify exception cause
"C", # complexity "C", # complexity
"COM818", # Trailing comma on bare tuple prohibited "COM818", # Trailing comma on bare tuple prohibited
"D", # docstrings "D", # docstrings
"DTZ003", # Use datetime.now(tz=) instead of datetime.utcnow() "DTZ003", # Use datetime.now(tz=) instead of datetime.utcnow()
"DTZ004", # Use datetime.fromtimestamp(ts, tz=) instead of datetime.utcfromtimestamp(ts) "DTZ004", # Use datetime.fromtimestamp(ts, tz=) instead of datetime.utcfromtimestamp(ts)
"E", # pycodestyle "E", # pycodestyle
"F", # pyflakes/autoflake "F", # pyflakes/autoflake
"G", # flake8-logging-format "G", # flake8-logging-format
"I", # isort "I", # isort
"ICN001", # import concentions; {name} should be imported as {asname} "ICN001", # import concentions; {name} should be imported as {asname}
"N804", # First argument of a class method should be named cls "N804", # First argument of a class method should be named cls
"N805", # First argument of a method should be named self "N805", # First argument of a method should be named self
"N815", # Variable {name} in class scope should not be mixedCase "N815", # Variable {name} in class scope should not be mixedCase
"PGH004", # Use specific rule codes when using noqa "PGH004", # Use specific rule codes when using noqa
"PLC0414", # Useless import alias. Import alias does not rename original package. "PLC0414", # Useless import alias. Import alias does not rename original package.
"PLC", # pylint "PLC", # pylint
"PLE", # pylint "PLE", # pylint
"PLR", # pylint "PLR", # pylint
"PLW", # pylint "PLW", # pylint
"Q000", # Double quotes found but single quotes preferred "Q000", # Double quotes found but single quotes preferred
"RUF006", # Store a reference to the return value of asyncio.create_task "RUF006", # Store a reference to the return value of asyncio.create_task
"S102", # Use of exec detected "S102", # Use of exec detected
"S103", # bad-file-permissions "S103", # bad-file-permissions
"S108", # hardcoded-temp-file "S108", # hardcoded-temp-file
"S306", # suspicious-mktemp-usage "S306", # suspicious-mktemp-usage
"S307", # suspicious-eval-usage "S307", # suspicious-eval-usage
"S313", # suspicious-xmlc-element-tree-usage "S313", # suspicious-xmlc-element-tree-usage
"S314", # suspicious-xml-element-tree-usage "S314", # suspicious-xml-element-tree-usage
"S315", # suspicious-xml-expat-reader-usage "S315", # suspicious-xml-expat-reader-usage
"S316", # suspicious-xml-expat-builder-usage "S316", # suspicious-xml-expat-builder-usage
"S317", # suspicious-xml-sax-usage "S317", # suspicious-xml-sax-usage
"S318", # suspicious-xml-mini-dom-usage "S318", # suspicious-xml-mini-dom-usage
"S319", # suspicious-xml-pull-dom-usage "S319", # suspicious-xml-pull-dom-usage
"S601", # paramiko-call "S601", # paramiko-call
"S602", # subprocess-popen-with-shell-equals-true "S602", # subprocess-popen-with-shell-equals-true
"S604", # call-with-shell-equals-true "S604", # call-with-shell-equals-true
"S608", # hardcoded-sql-expression "S608", # hardcoded-sql-expression
"S609", # unix-command-wildcard-injection "S609", # unix-command-wildcard-injection
"SIM105", # Use contextlib.suppress({exception}) instead of try-except-pass "SIM105", # Use contextlib.suppress({exception}) instead of try-except-pass
"SIM117", # Merge with-statements that use the same scope "SIM117", # Merge with-statements that use the same scope
"SIM118", # Use {key} in {dict} instead of {key} in {dict}.keys() "SIM118", # Use {key} in {dict} instead of {key} in {dict}.keys()
"SIM201", # Use {left} != {right} instead of not {left} == {right} "SIM201", # Use {left} != {right} instead of not {left} == {right}
"SIM208", # Use {expr} instead of not (not {expr}) "SIM208", # Use {expr} instead of not (not {expr})
"SIM212", # Use {a} if {a} else {b} instead of {b} if not {a} else {a} "SIM212", # Use {a} if {a} else {b} instead of {b} if not {a} else {a}
"SIM300", # Yoda conditions. Use 'age == 42' instead of '42 == age'. "SIM300", # Yoda conditions. Use 'age == 42' instead of '42 == age'.
"SIM401", # Use get from dict with default instead of an if block "SIM401", # Use get from dict with default instead of an if block
"T100", # Trace found: {name} used "T100", # Trace found: {name} used
"T20", # flake8-print "T20", # flake8-print
"TID251", # Banned imports "TID251", # Banned imports
"TRY004", # Prefer TypeError exception for invalid type "TRY004", # Prefer TypeError exception for invalid type
"TRY203", # Remove exception handler; error is immediately re-raised "TRY203", # Remove exception handler; error is immediately re-raised
"UP", # pyupgrade "UP", # pyupgrade
"W", # pycodestyle "W", # pycodestyle
] ]
lint.ignore = [ lint.ignore = [
"D202", # No blank lines allowed after function docstring "D202", # No blank lines allowed after function docstring
"D203", # 1 blank line required before class docstring "D203", # 1 blank line required before class docstring
"D213", # Multi-line docstring summary should start at the second line "D213", # Multi-line docstring summary should start at the second line
"D406", # Section name should end with a newline "D406", # Section name should end with a newline
"D407", # Section name underlining "D407", # Section name underlining
"E501", # line too long "E501", # line too long
"E731", # do not assign a lambda expression, use a def "E731", # do not assign a lambda expression, use a def
# Ignore ignored, as the rule is now back in preview/nursery, which cannot # Ignore ignored, as the rule is now back in preview/nursery, which cannot
# be ignored anymore without warnings. # be ignored anymore without warnings.
# https://github.com/astral-sh/ruff/issues/7491 # https://github.com/astral-sh/ruff/issues/7491
# "PLC1901", # Lots of false positives # "PLC1901", # Lots of false positives
# False positives https://github.com/astral-sh/ruff/issues/5386 # False positives https://github.com/astral-sh/ruff/issues/5386
"PLC0208", # Use a sequence type instead of a `set` when iterating over values "PLC0208", # Use a sequence type instead of a `set` when iterating over values
"PLR0911", # Too many return statements ({returns} > {max_returns}) "PLR0911", # Too many return statements ({returns} > {max_returns})
"PLR0912", # Too many branches ({branches} > {max_branches}) "PLR0912", # Too many branches ({branches} > {max_branches})
"PLR0913", # Too many arguments to function call ({c_args} > {max_args}) "PLR0913", # Too many arguments to function call ({c_args} > {max_args})
"PLR0915", # Too many statements ({statements} > {max_statements}) "PLR0915", # Too many statements ({statements} > {max_statements})
"PLR2004", # Magic value used in comparison, consider replacing {value} with a constant variable "PLR2004", # Magic value used in comparison, consider replacing {value} with a constant variable
"PLW2901", # Outer {outer_kind} variable {name} overwritten by inner {inner_kind} target "PLW2901", # Outer {outer_kind} variable {name} overwritten by inner {inner_kind} target
"UP006", # keep type annotation style as is "UP006", # keep type annotation style as is
"UP007", # keep type annotation style as is "UP007", # keep type annotation style as is
# May conflict with the formatter, https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules # May conflict with the formatter, https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
"W191", "W191",
"E111", "E111",
"E114", "E114",
"E117", "E117",
"D206", "D206",
"D300", "D300",
"Q000", "Q000",
"Q001", "Q001",
"Q002", "Q002",
"Q003", "Q003",
"COM812", "COM812",
"COM819", "COM819",
"ISC001", "ISC001",
"ISC002", "ISC002",
# Disabled because ruff does not understand type of __all__ generated by a function # Disabled because ruff does not understand type of __all__ generated by a function
"PLE0605", "PLE0605",
] ]
[tool.ruff.lint.flake8-import-conventions.extend-aliases] [tool.ruff.lint.flake8-import-conventions.extend-aliases]
@@ -354,11 +354,11 @@ fixture-parentheses = false
[tool.ruff.lint.isort] [tool.ruff.lint.isort]
force-sort-within-sections = true force-sort-within-sections = true
section-order = [ section-order = [
"future", "future",
"standard-library", "standard-library",
"third-party", "third-party",
"first-party", "first-party",
"local-folder", "local-folder",
] ]
forced-separate = ["tests"] forced-separate = ["tests"]
known-first-party = ["supervisor", "tests"] known-first-party = ["supervisor", "tests"]