@@ -5,45 +5,42 @@ readme = "README.md"
55keywords = [" kitchenowl" ]
66version = " 0.0.2"
77authors = [
8- {name = " Tom Bursch" , email = " tom@kitchenowl.org" },
9- {name = " super-qua" },
8+ { name = " Tom Bursch" , email = " tom@kitchenowl.org" },
9+ { name = " super-qua" },
1010]
11- license = {file = " LICENSE" }
11+ license = { file = " LICENSE" }
1212classifiers = [
13- " Development Status :: 3 - Alpha" ,
14- " Programming Language :: Python"
13+ " Development Status :: 3 - Alpha" ,
14+ " Programming Language :: Python" ,
1515]
16- dependencies = [
17- " aiohttp >= 3.11.11"
18- ]
19- requires-python = " >=3.8"
16+ dependencies = [" aiohttp >= 3.11.11" ]
17+ requires-python = " >=3.12"
2018
2119[project .optional-dependencies ]
2220test = [
23- " aioresponses == 0.7.8" ,
24- " pytest == 8.3.4" ,
25- " pytest-asyncio == 0.25.3" ,
26- " pytest-cov == 6.0.0" ,
27- " syrupy == 4.8.1"
28- ]
29- lint = [
30- " ruff == 0.9.4"
21+ " aioresponses >= 0.7.8" ,
22+ " pytest >= 8.3.4" ,
23+ " pytest-asyncio >= 0.25.3" ,
24+ " pytest-cov >= 6.0.0" ,
25+ " syrupy >= 4.8.1" ,
3126]
27+ lint = [" ruff >= 0.9.4" ]
3228
3329[project .urls ]
3430Homepage = " https://kitchenowl.org"
3531Repository = " https://github.com/tombursch/kitchenowl-python"
3632Issues = " https://github.com/TomBursch/kitchenowl/issues"
3733Changelog = " https://github.com/tombursch/kitchenowl-python/blob/main/CHANGELOG.md"
3834
35+ [build-system ]
36+ requires = [" uv_build>=0.11.3,<0.12" ]
37+ build-backend = " uv_build"
3938
4039[tool .pytest .ini_options ]
4140minversion = 6.0
4241pythonpath = " src"
4342asyncio_mode = " auto"
44- markers = [
45- " slow: marks tests as slow (deselect with '-m \" not slow\" ')" ,
46- ]
43+ markers = [" slow: marks tests as slow (deselect with '-m \" not slow\" ')" ]
4744
4845[tool .ruff ]
4946line-length = 100
@@ -57,87 +54,86 @@ line-ending = "auto"
5754[tool .ruff .lint ]
5855# linter rules copied from https://github.com/home-assistant/core/blob/dev/pyproject.toml
5956select = [
60- " A001" , # Variable {name} is shadowing a Python builtin
57+ " A001" , # Variable {name} is shadowing a Python builtin
6158 " ASYNC210" , # Async functions should not call blocking HTTP methods
6259 " ASYNC220" , # Async functions should not create subprocesses with blocking methods
6360 " ASYNC221" , # Async functions should not run processes with blocking methods
6461 " ASYNC222" , # Async functions should not wait on processes with blocking methods
6562 " ASYNC230" , # Async functions should not open files with blocking methods like open
6663 " ASYNC251" , # Async functions should not call time.sleep
67- " B002" , # Python does not support the unary prefix increment
68- " B005" , # Using .strip() with multi-character strings is misleading
69- " B007" , # Loop control variable {name} not used within loop body
70- " B014" , # Exception handler with duplicate exception
71- " B015" , # Pointless comparison. Did you mean to assign a value? Otherwise, prepend assert or remove it.
72- " B017" , # pytest.raises(BaseException) should be considered evil
73- " B018" , # Found useless attribute access. Either assign it to a variable or remove it.
74- " B023" , # Function definition does not bind loop variable {name}
75- " B026" , # Star-arg unpacking after a keyword argument is strongly discouraged
76- " B032" , # Possible unintentional type annotation (using :). Did you mean to assign (using =)?
77- " B904" , # Use raise from to specify exception cause
78- " B905" , # zip() without an explicit strict= parameter
64+ " B002" , # Python does not support the unary prefix increment
65+ " B005" , # Using .strip() with multi-character strings is misleading
66+ " B007" , # Loop control variable {name} not used within loop body
67+ " B014" , # Exception handler with duplicate exception
68+ " B015" , # Pointless comparison. Did you mean to assign a value? Otherwise, prepend assert or remove it.
69+ " B017" , # pytest.raises(BaseException) should be considered evil
70+ " B018" , # Found useless attribute access. Either assign it to a variable or remove it.
71+ " B023" , # Function definition does not bind loop variable {name}
72+ " B026" , # Star-arg unpacking after a keyword argument is strongly discouraged
73+ " B032" , # Possible unintentional type annotation (using :). Did you mean to assign (using =)?
74+ " B904" , # Use raise from to specify exception cause
75+ " B905" , # zip() without an explicit strict= parameter
7976 " BLE" ,
80- " C" , # complexity
81- " COM818" , # Trailing comma on bare tuple prohibited
82- " D" , # docstrings
83- " DTZ003" , # Use datetime.now(tz=) instead of datetime.utcnow()
84- " DTZ004" , # Use datetime.fromtimestamp(ts, tz=) instead of datetime.utcfromtimestamp(ts)
85- " E" , # pycodestyle
86- " F" , # pyflakes/autoflake
87- " FLY" , # flynt
88- " FURB" , # refurb
89- " G" , # flake8-logging-format
90- " I" , # isort
91- " INP" , # flake8-no-pep420
92- " ISC" , # flake8-implicit-str-concat
93- " ICN001" , # import concentions; {name} should be imported as {asname}
94- " LOG" , # flake8-logging
95- " N804" , # First argument of a class method should be named cls
96- " N805" , # First argument of a method should be named self
97- " N815" , # Variable {name} in class scope should not be mixedCase
98- " PERF" , # Perflint
99- " PGH" , # pygrep-hooks
100- " PIE" , # flake8-pie
101- " PL" , # pylint
102- " PT" , # flake8-pytest-style
103- " PYI" , # flake8-pyi
104- " RET" , # flake8-return
105- " RSE" , # flake8-raise
106- " RUF005" , # Consider iterable unpacking instead of concatenation
107- " RUF006" , # Store a reference to the return value of asyncio.create_task
108- " RUF010" , # Use explicit conversion flag
109- " RUF013" , # PEP 484 prohibits implicit Optional
110- " RUF017" , # Avoid quadratic list summation
111- " RUF018" , # Avoid assignment expressions in assert statements
112- " RUF019" , # Unnecessary key check before dictionary access
77+ " C" , # complexity
78+ " COM818" , # Trailing comma on bare tuple prohibited
79+ " D" , # docstrings
80+ " DTZ003" , # Use datetime.now(tz=) instead of datetime.utcnow()
81+ " DTZ004" , # Use datetime.fromtimestamp(ts, tz=) instead of datetime.utcfromtimestamp(ts)
82+ " E" , # pycodestyle
83+ " F" , # pyflakes/autoflake
84+ " FLY" , # flynt
85+ " FURB" , # refurb
86+ " G" , # flake8-logging-format
87+ " I" , # isort
88+ " INP" , # flake8-no-pep420
89+ " ISC" , # flake8-implicit-str-concat
90+ " ICN001" , # import concentions; {name} should be imported as {asname}
91+ " LOG" , # flake8-logging
92+ " N804" , # First argument of a class method should be named cls
93+ " N805" , # First argument of a method should be named self
94+ " N815" , # Variable {name} in class scope should not be mixedCase
95+ " PERF" , # Perflint
96+ " PGH" , # pygrep-hooks
97+ " PIE" , # flake8-pie
98+ " PL" , # pylint
99+ " PT" , # flake8-pytest-style
100+ " PYI" , # flake8-pyi
101+ " RET" , # flake8-return
102+ " RSE" , # flake8-raise
103+ " RUF005" , # Consider iterable unpacking instead of concatenation
104+ " RUF006" , # Store a reference to the return value of asyncio.create_task
105+ " RUF010" , # Use explicit conversion flag
106+ " RUF013" , # PEP 484 prohibits implicit Optional
107+ " RUF017" , # Avoid quadratic list summation
108+ " RUF018" , # Avoid assignment expressions in assert statements
109+ " RUF019" , # Unnecessary key check before dictionary access
113110 # "RUF100", # Unused `noqa` directive; temporarily every now and then to clean them up
114- " S102" , # Use of exec detected
115- " S103" , # bad-file-permissions
116- " S108" , # hardcoded-temp-file
117- " S306" , # suspicious-mktemp-usage
118- " S307" , # suspicious-eval-usage
119- " S313" , # suspicious-xmlc-element-tree-usage
120- " S314" , # suspicious-xml-element-tree-usage
121- " S315" , # suspicious-xml-expat-reader-usage
122- " S316" , # suspicious-xml-expat-builder-usage
123- " S317" , # suspicious-xml-sax-usage
124- " S318" , # suspicious-xml-mini-dom-usage
125- " S319" , # suspicious-xml-pull-dom-usage
126- " S320" , # suspicious-xmle-tree-usage
127- " S601" , # paramiko-call
128- " S602" , # subprocess-popen-with-shell-equals-true
129- " S604" , # call-with-shell-equals-true
130- " S608" , # hardcoded-sql-expression
131- " S609" , # unix-command-wildcard-injection
132- " SIM" , # flake8-simplify
133- " SLF" , # flake8-self
134- " SLOT" , # flake8-slots
135- " T100" , # Trace found: {name} used
136- " T20" , # flake8-print
111+ " S102" , # Use of exec detected
112+ " S103" , # bad-file-permissions
113+ " S108" , # hardcoded-temp-file
114+ " S306" , # suspicious-mktemp-usage
115+ " S307" , # suspicious-eval-usage
116+ " S313" , # suspicious-xmlc-element-tree-usage
117+ " S314" , # suspicious-xml-element-tree-usage
118+ " S315" , # suspicious-xml-expat-reader-usage
119+ " S316" , # suspicious-xml-expat-builder-usage
120+ " S317" , # suspicious-xml-sax-usage
121+ " S318" , # suspicious-xml-mini-dom-usage
122+ " S319" , # suspicious-xml-pull-dom-usage
123+ " S601" , # paramiko-call
124+ " S602" , # subprocess-popen-with-shell-equals-true
125+ " S604" , # call-with-shell-equals-true
126+ " S608" , # hardcoded-sql-expression
127+ " S609" , # unix-command-wildcard-injection
128+ " SIM" , # flake8-simplify
129+ " SLF" , # flake8-self
130+ " SLOT" , # flake8-slots
131+ " T100" , # Trace found: {name} used
132+ " T20" , # flake8-print
137133 " TID251" , # Banned imports
138- " TRY" , # tryceratops
139- " UP" , # pyupgrade
140- " W" , # pycodestyle
134+ " TRY" , # tryceratops
135+ " UP" , # pyupgrade
136+ " W" , # pycodestyle
141137]
142138
143139ignore = [
@@ -155,21 +151,18 @@ ignore = [
155151 " PLR0915" , # Too many statements ({statements} > {max_statements})
156152 " PLR2004" , # Magic value used in comparison, consider replacing {value} with a constant variable
157153 " PLW2901" , # Outer {outer_kind} variable {name} overwritten by inner {inner_kind} target
158- " PT004" , # Fixture {fixture} does not return anything, add leading underscore
159- " PT011" , # pytest.raises({exception}) is too broad, set the `match` parameter or use a more specific exception
160- " PT018" , # Assertion should be broken down into multiple parts
161- " RUF001" , # String contains ambiguous unicode character.
162- " RUF002" , # Docstring contains ambiguous unicode character.
163- " RUF003" , # Comment contains ambiguous unicode character.
164- " RUF015" , # Prefer next(...) over single element slice
165- " SIM102" , # Use a single if statement instead of nested if statements
166- " SIM103" , # Return the condition {condition} directly
167- " SIM108" , # Use ternary operator {contents} instead of if-else-block
168- " SIM115" , # Use context handler for opening files
169- " TRY003" , # Avoid specifying long messages outside the exception class
170- " TRY400" , # Use `logging.exception` instead of `logging.error`
171- # Ignored due to performance: https://github.com/charliermarsh/ruff/issues/2923
172- " UP038" , # Use `X | Y` in `isinstance` call instead of `(X, Y)`
154+ " PT011" , # pytest.raises({exception}) is too broad, set the `match` parameter or use a more specific exception
155+ " PT018" , # Assertion should be broken down into multiple parts
156+ " RUF001" , # String contains ambiguous unicode character.
157+ " RUF002" , # Docstring contains ambiguous unicode character.
158+ " RUF003" , # Comment contains ambiguous unicode character.
159+ " RUF015" , # Prefer next(...) over single element slice
160+ " SIM102" , # Use a single if statement instead of nested if statements
161+ " SIM103" , # Return the condition {condition} directly
162+ " SIM108" , # Use ternary operator {contents} instead of if-else-block
163+ " SIM115" , # Use context handler for opening files
164+ " TRY003" , # Avoid specifying long messages outside the exception class
165+ " TRY400" , # Use `logging.exception` instead of `logging.error`
173166
174167 # May conflict with the formatter, https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
175168 " W191" ,
@@ -188,7 +181,7 @@ ignore = [
188181
189182 # temporarily disabled
190183 " RET503" ,
191- " TRY301"
184+ " TRY301" ,
192185]
193186
194187[tool .ruff .lint .pydocstyle ]
0 commit comments