aioautomower 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- aioautomower-1.0.0/LICENSE +21 -0
- aioautomower-1.0.0/PKG-INFO +106 -0
- aioautomower-1.0.0/README.md +74 -0
- aioautomower-1.0.0/pyproject.toml +426 -0
- aioautomower-1.0.0/src/aioautomower/__init__.py +11 -0
- aioautomower-1.0.0/src/aioautomower/auth.py +188 -0
- aioautomower-1.0.0/src/aioautomower/commands.py +378 -0
- aioautomower-1.0.0/src/aioautomower/const.py +66 -0
- aioautomower-1.0.0/src/aioautomower/exceptions.py +49 -0
- aioautomower-1.0.0/src/aioautomower/model/__init__.py +101 -0
- aioautomower-1.0.0/src/aioautomower/model/model.py +125 -0
- aioautomower-1.0.0/src/aioautomower/model/model_battery.py +12 -0
- aioautomower-1.0.0/src/aioautomower/model/model_calendar.py +239 -0
- aioautomower-1.0.0/src/aioautomower/model/model_capabilities.py +16 -0
- aioautomower-1.0.0/src/aioautomower/model/model_metadata.py +19 -0
- aioautomower-1.0.0/src/aioautomower/model/model_mower.py +281 -0
- aioautomower-1.0.0/src/aioautomower/model/model_planner.py +107 -0
- aioautomower-1.0.0/src/aioautomower/model/model_positions.py +20 -0
- aioautomower-1.0.0/src/aioautomower/model/model_settings.py +37 -0
- aioautomower-1.0.0/src/aioautomower/model/model_statistics.py +58 -0
- aioautomower-1.0.0/src/aioautomower/model/model_stay_out_zones.py +27 -0
- aioautomower-1.0.0/src/aioautomower/model/model_system.py +14 -0
- aioautomower-1.0.0/src/aioautomower/model/model_token.py +33 -0
- aioautomower-1.0.0/src/aioautomower/model/model_work_areas.py +29 -0
- aioautomower-1.0.0/src/aioautomower/model/utils.py +26 -0
- aioautomower-1.0.0/src/aioautomower/model_input/__init__.py +23 -0
- aioautomower-1.0.0/src/aioautomower/model_input/model_event.py +42 -0
- aioautomower-1.0.0/src/aioautomower/model_input/model_rest.py +147 -0
- aioautomower-1.0.0/src/aioautomower/py.typed +0 -0
- aioautomower-1.0.0/src/aioautomower/session.py +299 -0
- aioautomower-1.0.0/src/aioautomower/timeline.py +108 -0
- aioautomower-1.0.0/src/aioautomower/tz_util.py +27 -0
- aioautomower-1.0.0/src/aioautomower/utils.py +102 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Thomas Peter Protzner
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: aioautomower
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: MPython module to talk to Husqvarna Automower.
|
|
5
|
+
License: MIT
|
|
6
|
+
Keywords: Husqvarna,Automower,api,async,client
|
|
7
|
+
Author: Thomas Peter Protzner
|
|
8
|
+
Author-email: thomas.protzner@gmail.com
|
|
9
|
+
Requires-Python: >=3.11,<4.0
|
|
10
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
11
|
+
Classifier: Framework :: AsyncIO
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Natural Language :: English
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
20
|
+
Requires-Dist: PyJWT (>=2.8.0,<3.0.0)
|
|
21
|
+
Requires-Dist: aiohttp (>=3.9.3,<4.0.0)
|
|
22
|
+
Requires-Dist: ical (>=8.0.1)
|
|
23
|
+
Requires-Dist: mashumaro (>=3.12,<4.0)
|
|
24
|
+
Requires-Dist: python-dateutil (>=2.9.0-post.0,<3.0.0)
|
|
25
|
+
Requires-Dist: tzlocal (>=5.2,<6.0)
|
|
26
|
+
Project-URL: Documentation, https://github.com/Thomas55555/aioautomower
|
|
27
|
+
Project-URL: Homepage, https://github.com/Thomas55555/aioautomower
|
|
28
|
+
Project-URL: Issues, https://github.com/Thomas55555/aioautomower/issues
|
|
29
|
+
Project-URL: Repository, https://github.com/Thomas55555/aioautomower
|
|
30
|
+
Description-Content-Type: text/markdown
|
|
31
|
+
|
|
32
|
+
# Aioautomower
|
|
33
|
+
|
|
34
|
+
[](https://codecov.io/gh/Thomas55555/aioautomower)
|
|
35
|
+
[](https://pypi.org/project/aioautomower/)
|
|
36
|
+
[](LICENSE.md)
|
|
37
|
+
|
|
38
|
+
Asynchronous library to communicate with the Automower Connect API
|
|
39
|
+
To use this library, you need to register on the [Husqvarna Developers Portal](https://developer.husqvarnagroup.cloud/).
|
|
40
|
+
And connect your account to the `Authentication API` and the `Automower Connect API`.
|
|
41
|
+
|
|
42
|
+
## Quickstart
|
|
43
|
+
|
|
44
|
+
In order to use the library, you'll need to do some work yourself to get authentication
|
|
45
|
+
credentials. This depends a lot on the context (e.g. redirecting to use OAuth via web)
|
|
46
|
+
but should be easy to incorporate using Husqvarna's authentication examples. See
|
|
47
|
+
Husqvarna's [Authentication API](https://developer.husqvarnagroup.cloud/apis/authentication-api) for details.
|
|
48
|
+
|
|
49
|
+
You will implement `AbstractAuth` to provide an access token. Your implementation
|
|
50
|
+
will handle any necessary refreshes. You can invoke the service with your auth implementation
|
|
51
|
+
to access the API.
|
|
52
|
+
|
|
53
|
+
You need at least:
|
|
54
|
+
|
|
55
|
+
- Python 3.11+
|
|
56
|
+
- [Poetry][poetry-install]
|
|
57
|
+
|
|
58
|
+
For a first start you can run the `example.py`, by doing the following steps
|
|
59
|
+
|
|
60
|
+
- `git clone https://github.com/Thomas55555/aioautomower.git`
|
|
61
|
+
- `cd aioautomower`
|
|
62
|
+
- `poetry install`
|
|
63
|
+
- Enter your personal `client_id` and `client_secret` in the `_secrets.yaml` and rename it to `secrets.yaml`
|
|
64
|
+
- Run with `poetry run ./example.py`
|
|
65
|
+
|
|
66
|
+
## Contributing
|
|
67
|
+
|
|
68
|
+
This is an active open-source project. We are always open to people who want to use the code or contribute to it.
|
|
69
|
+
This Python project is fully managed using the [Poetry][poetry] dependency manager.
|
|
70
|
+
|
|
71
|
+
As this repository uses the [pre-commit][pre-commit] framework, all changes
|
|
72
|
+
are linted and tested with each commit. You can run all checks and tests
|
|
73
|
+
manually, using the following command:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
poetry run pre-commit run --all-files
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
To run just the Python tests:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
poetry run pytest
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
To update snapshots:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
poetry run pytest --snapshot-update
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
[poetry-install]: https://python-poetry.org/docs/#installation
|
|
92
|
+
[poetry]: https://python-poetry.org
|
|
93
|
+
[pre-commit]: https://pre-commit.com/
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
# Buying Equipment
|
|
97
|
+
|
|
98
|
+
Many mowers are available from your local garden dealer or major online retailers. Another like, the compact ideal for small and flat lawns, is available on Amazon.
|
|
99
|
+
The links provided below are affiliate links, so if you prefer shopping on Amazon and decide to purchase something there, you’ll also be supporting me at no additional cost to you.
|
|
100
|
+
Alternatively, if you'd like to support the project directly, consider contributing through [GitHub sponsors](https://github.com/sponsors/Thomas55555).
|
|
101
|
+
Here are some affiliate links to support my work:
|
|
102
|
+
- [Automower R4 Aspire](https://amzn.to/3Z987Oc)
|
|
103
|
+
- [Endurence blades](https://amzn.to/3OyK1YD)
|
|
104
|
+
- [Regular blades](https://amzn.to/3ZCn8Zt)
|
|
105
|
+
- [Cabel connector](https://amzn.to/4f3OtJn)
|
|
106
|
+
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Aioautomower
|
|
2
|
+
|
|
3
|
+
[](https://codecov.io/gh/Thomas55555/aioautomower)
|
|
4
|
+
[](https://pypi.org/project/aioautomower/)
|
|
5
|
+
[](LICENSE.md)
|
|
6
|
+
|
|
7
|
+
Asynchronous library to communicate with the Automower Connect API
|
|
8
|
+
To use this library, you need to register on the [Husqvarna Developers Portal](https://developer.husqvarnagroup.cloud/).
|
|
9
|
+
And connect your account to the `Authentication API` and the `Automower Connect API`.
|
|
10
|
+
|
|
11
|
+
## Quickstart
|
|
12
|
+
|
|
13
|
+
In order to use the library, you'll need to do some work yourself to get authentication
|
|
14
|
+
credentials. This depends a lot on the context (e.g. redirecting to use OAuth via web)
|
|
15
|
+
but should be easy to incorporate using Husqvarna's authentication examples. See
|
|
16
|
+
Husqvarna's [Authentication API](https://developer.husqvarnagroup.cloud/apis/authentication-api) for details.
|
|
17
|
+
|
|
18
|
+
You will implement `AbstractAuth` to provide an access token. Your implementation
|
|
19
|
+
will handle any necessary refreshes. You can invoke the service with your auth implementation
|
|
20
|
+
to access the API.
|
|
21
|
+
|
|
22
|
+
You need at least:
|
|
23
|
+
|
|
24
|
+
- Python 3.11+
|
|
25
|
+
- [Poetry][poetry-install]
|
|
26
|
+
|
|
27
|
+
For a first start you can run the `example.py`, by doing the following steps
|
|
28
|
+
|
|
29
|
+
- `git clone https://github.com/Thomas55555/aioautomower.git`
|
|
30
|
+
- `cd aioautomower`
|
|
31
|
+
- `poetry install`
|
|
32
|
+
- Enter your personal `client_id` and `client_secret` in the `_secrets.yaml` and rename it to `secrets.yaml`
|
|
33
|
+
- Run with `poetry run ./example.py`
|
|
34
|
+
|
|
35
|
+
## Contributing
|
|
36
|
+
|
|
37
|
+
This is an active open-source project. We are always open to people who want to use the code or contribute to it.
|
|
38
|
+
This Python project is fully managed using the [Poetry][poetry] dependency manager.
|
|
39
|
+
|
|
40
|
+
As this repository uses the [pre-commit][pre-commit] framework, all changes
|
|
41
|
+
are linted and tested with each commit. You can run all checks and tests
|
|
42
|
+
manually, using the following command:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
poetry run pre-commit run --all-files
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
To run just the Python tests:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
poetry run pytest
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
To update snapshots:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
poetry run pytest --snapshot-update
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
[poetry-install]: https://python-poetry.org/docs/#installation
|
|
61
|
+
[poetry]: https://python-poetry.org
|
|
62
|
+
[pre-commit]: https://pre-commit.com/
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
# Buying Equipment
|
|
66
|
+
|
|
67
|
+
Many mowers are available from your local garden dealer or major online retailers. Another like, the compact ideal for small and flat lawns, is available on Amazon.
|
|
68
|
+
The links provided below are affiliate links, so if you prefer shopping on Amazon and decide to purchase something there, you’ll also be supporting me at no additional cost to you.
|
|
69
|
+
Alternatively, if you'd like to support the project directly, consider contributing through [GitHub sponsors](https://github.com/sponsors/Thomas55555).
|
|
70
|
+
Here are some affiliate links to support my work:
|
|
71
|
+
- [Automower R4 Aspire](https://amzn.to/3Z987Oc)
|
|
72
|
+
- [Endurence blades](https://amzn.to/3OyK1YD)
|
|
73
|
+
- [Regular blades](https://amzn.to/3ZCn8Zt)
|
|
74
|
+
- [Cabel connector](https://amzn.to/4f3OtJn)
|
|
@@ -0,0 +1,426 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["poetry-core"]
|
|
3
|
+
build-backend = "poetry.core.masonry.api"
|
|
4
|
+
|
|
5
|
+
[tool.poetry]
|
|
6
|
+
name = "aioautomower"
|
|
7
|
+
# The version is set by GH action on release
|
|
8
|
+
version = "1.0.0"
|
|
9
|
+
description = "MPython module to talk to Husqvarna Automower."
|
|
10
|
+
authors = [
|
|
11
|
+
"Thomas Peter Protzner <thomas.protzner@gmail.com>",
|
|
12
|
+
]
|
|
13
|
+
license = "MIT"
|
|
14
|
+
readme = "README.md"
|
|
15
|
+
packages = [
|
|
16
|
+
{ include = "aioautomower", from = "src" },
|
|
17
|
+
]
|
|
18
|
+
homepage = "https://github.com/Thomas55555/aioautomower"
|
|
19
|
+
repository = "https://github.com/Thomas55555/aioautomower"
|
|
20
|
+
documentation = "https://github.com/Thomas55555/aioautomower"
|
|
21
|
+
keywords = ["Husqvarna", "Automower", "api", "async", "client"]
|
|
22
|
+
classifiers = [
|
|
23
|
+
"Development Status :: 5 - Production/Stable",
|
|
24
|
+
"Framework :: AsyncIO",
|
|
25
|
+
"Intended Audience :: Developers",
|
|
26
|
+
"Natural Language :: English",
|
|
27
|
+
"Programming Language :: Python :: 3.11",
|
|
28
|
+
"Programming Language :: Python :: 3.12",
|
|
29
|
+
"Programming Language :: Python :: 3.13",
|
|
30
|
+
"Programming Language :: Python :: 3",
|
|
31
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
[tool.poetry.urls]
|
|
35
|
+
Issues = "https://github.com/Thomas55555/aioautomower/issues"
|
|
36
|
+
|
|
37
|
+
[tool.poetry.dependencies]
|
|
38
|
+
python = "^3.11"
|
|
39
|
+
aiohttp = "^3.9.3"
|
|
40
|
+
mashumaro = "^3.12"
|
|
41
|
+
PyJWT = "^2.8.0"
|
|
42
|
+
ical = ">=8.0.1"
|
|
43
|
+
tzlocal = "^5.2"
|
|
44
|
+
python-dateutil = "^2.9.0-post.0"
|
|
45
|
+
|
|
46
|
+
[tool.poetry.group.dev.dependencies]
|
|
47
|
+
aioresponses = "0.7.8"
|
|
48
|
+
codespell = "2.4.1"
|
|
49
|
+
covdefaults = "2.3.0"
|
|
50
|
+
coverage = {version = "7.9.1", extras = ["toml"]}
|
|
51
|
+
mypy = "1.16.1"
|
|
52
|
+
pre-commit = "4.2.0"
|
|
53
|
+
pre-commit-hooks = "5.0.0"
|
|
54
|
+
pylint = "3.3.7"
|
|
55
|
+
pytest = "8.4.1"
|
|
56
|
+
pytest-asyncio = "1.0.0"
|
|
57
|
+
pytest-cov = "6.2.1"
|
|
58
|
+
ruff = "0.12.0"
|
|
59
|
+
syrupy = "4.9.1"
|
|
60
|
+
time-machine = "2.16.0"
|
|
61
|
+
types-python-dateutil = "^2.9.0.20240821"
|
|
62
|
+
types-pyyaml = "^6.0.12.20241230"
|
|
63
|
+
yamllint = "1.37.1"
|
|
64
|
+
|
|
65
|
+
[tool.poetry-dynamic-versioning]
|
|
66
|
+
enable = true
|
|
67
|
+
|
|
68
|
+
[tool.pytest.ini_options]
|
|
69
|
+
addopts = "--cov=aioautomower --cov-report=term-missing -vv"
|
|
70
|
+
asyncio_mode = "auto"
|
|
71
|
+
asyncio_default_fixture_loop_scope = "session"
|
|
72
|
+
|
|
73
|
+
[tool.ruff]
|
|
74
|
+
fix = true
|
|
75
|
+
show-fixes = true
|
|
76
|
+
src = ["./src"]
|
|
77
|
+
target-version = "py311"
|
|
78
|
+
line-length = 88
|
|
79
|
+
include = ["src/**/*.py"]
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
[tool.ruff.lint]
|
|
83
|
+
ignore = [
|
|
84
|
+
"ANN401", # Opinioated warning on disallowing dynamically typed expressions
|
|
85
|
+
"D203", # Conflicts with other rules
|
|
86
|
+
"D213", # Conflicts with other rules
|
|
87
|
+
"D417", # False positives in some occasions
|
|
88
|
+
"PLR2004", # Just annoying, not really useful
|
|
89
|
+
|
|
90
|
+
# Conflicts with the Ruff formatter
|
|
91
|
+
"COM812",
|
|
92
|
+
]
|
|
93
|
+
select = ["ALL"]
|
|
94
|
+
|
|
95
|
+
[tool.ruff.lint.per-file-ignores]
|
|
96
|
+
# Allow for main entry & scripts to write to stdout
|
|
97
|
+
"example.py" = ["T201", "T203"]
|
|
98
|
+
|
|
99
|
+
[tool.pylint.FORMAT]
|
|
100
|
+
max-line-length = 88
|
|
101
|
+
|
|
102
|
+
[tool.ruff.lint.flake8-annotations]
|
|
103
|
+
allow-star-arg-any = true
|
|
104
|
+
suppress-dummy-args = true
|
|
105
|
+
|
|
106
|
+
[tool.ruff.lint.flake8-builtins]
|
|
107
|
+
builtins-ignorelist = ["id"]
|
|
108
|
+
|
|
109
|
+
[tool.ruff.lint.pydocstyle]
|
|
110
|
+
# Use Google-style docstrings.
|
|
111
|
+
convention = "pep257"
|
|
112
|
+
|
|
113
|
+
[tool.ruff.lint.pylint]
|
|
114
|
+
max-branches=25
|
|
115
|
+
max-returns=15
|
|
116
|
+
max-args=10
|
|
117
|
+
max-statements=50
|
|
118
|
+
|
|
119
|
+
[tool.pylint]
|
|
120
|
+
ignore = ["R0902"]
|
|
121
|
+
|
|
122
|
+
[tool.pylint.MASTER]
|
|
123
|
+
ignore = [
|
|
124
|
+
"tests",
|
|
125
|
+
]
|
|
126
|
+
|
|
127
|
+
[tool.pylint."MESSAGES CONTROL"]
|
|
128
|
+
# Reasons disabled:
|
|
129
|
+
# format - handled by ruff
|
|
130
|
+
# locally-disabled - it spams too much
|
|
131
|
+
# duplicate-code - unavoidable
|
|
132
|
+
# cyclic-import - doesn't test if both import on load
|
|
133
|
+
# abstract-class-little-used - prevents from setting right foundation
|
|
134
|
+
# unused-argument - generic callbacks and setup methods create a lot of warnings
|
|
135
|
+
# too-many-* - are not enforced for the sake of readability
|
|
136
|
+
# too-few-* - same as too-many-*
|
|
137
|
+
# abstract-method - with intro of async there are always methods missing
|
|
138
|
+
# inconsistent-return-statements - doesn't handle raise
|
|
139
|
+
# too-many-ancestors - it's too strict.
|
|
140
|
+
# wrong-import-order - isort guards this
|
|
141
|
+
# possibly-used-before-assignment - too many errors / not necessarily issues
|
|
142
|
+
# ---
|
|
143
|
+
# Pylint CodeStyle plugin
|
|
144
|
+
disable = [
|
|
145
|
+
"format",
|
|
146
|
+
"abstract-method",
|
|
147
|
+
"cyclic-import",
|
|
148
|
+
"duplicate-code",
|
|
149
|
+
"inconsistent-return-statements",
|
|
150
|
+
"locally-disabled",
|
|
151
|
+
"not-context-manager",
|
|
152
|
+
"too-few-public-methods",
|
|
153
|
+
"too-many-ancestors",
|
|
154
|
+
"too-many-arguments",
|
|
155
|
+
"too-many-instance-attributes",
|
|
156
|
+
"too-many-lines",
|
|
157
|
+
"too-many-locals",
|
|
158
|
+
"too-many-public-methods",
|
|
159
|
+
"too-many-boolean-expressions",
|
|
160
|
+
"too-many-positional-arguments",
|
|
161
|
+
"wrong-import-order",
|
|
162
|
+
"possibly-used-before-assignment",
|
|
163
|
+
|
|
164
|
+
# Handled by ruff
|
|
165
|
+
# Ref: <https://github.com/astral-sh/ruff/issues/970>
|
|
166
|
+
"await-outside-async", # PLE1142
|
|
167
|
+
"bad-str-strip-call", # PLE1310
|
|
168
|
+
"bad-string-format-type", # PLE1307
|
|
169
|
+
"bidirectional-unicode", # PLE2502
|
|
170
|
+
"continue-in-finally", # PLE0116
|
|
171
|
+
"duplicate-bases", # PLE0241
|
|
172
|
+
"misplaced-bare-raise", # PLE0704
|
|
173
|
+
"format-needs-mapping", # F502
|
|
174
|
+
"function-redefined", # F811
|
|
175
|
+
# Needed because ruff does not understand type of __all__ generated by a function
|
|
176
|
+
# "invalid-all-format", # PLE0605
|
|
177
|
+
"invalid-all-object", # PLE0604
|
|
178
|
+
"invalid-character-backspace", # PLE2510
|
|
179
|
+
"invalid-character-esc", # PLE2513
|
|
180
|
+
"invalid-character-nul", # PLE2514
|
|
181
|
+
"invalid-character-sub", # PLE2512
|
|
182
|
+
"invalid-character-zero-width-space", # PLE2515
|
|
183
|
+
"logging-too-few-args", # PLE1206
|
|
184
|
+
"logging-too-many-args", # PLE1205
|
|
185
|
+
"missing-format-string-key", # F524
|
|
186
|
+
"mixed-format-string", # F506
|
|
187
|
+
"no-method-argument", # N805
|
|
188
|
+
"no-self-argument", # N805
|
|
189
|
+
"nonexistent-operator", # B002
|
|
190
|
+
"nonlocal-without-binding", # PLE0117
|
|
191
|
+
"not-in-loop", # F701, F702
|
|
192
|
+
"notimplemented-raised", # F901
|
|
193
|
+
"return-in-init", # PLE0101
|
|
194
|
+
"return-outside-function", # F706
|
|
195
|
+
"syntax-error", # E999
|
|
196
|
+
"too-few-format-args", # F524
|
|
197
|
+
"too-many-format-args", # F522
|
|
198
|
+
"too-many-star-expressions", # F622
|
|
199
|
+
"truncated-format-string", # F501
|
|
200
|
+
"undefined-all-variable", # F822
|
|
201
|
+
"undefined-variable", # F821
|
|
202
|
+
"used-prior-global-declaration", # PLE0118
|
|
203
|
+
"yield-inside-async-function", # PLE1700
|
|
204
|
+
"yield-outside-function", # F704
|
|
205
|
+
"anomalous-backslash-in-string", # W605
|
|
206
|
+
"assert-on-string-literal", # PLW0129
|
|
207
|
+
"assert-on-tuple", # F631
|
|
208
|
+
"bad-format-string", # W1302, F
|
|
209
|
+
"bad-format-string-key", # W1300, F
|
|
210
|
+
"bare-except", # E722
|
|
211
|
+
"binary-op-exception", # PLW0711
|
|
212
|
+
"cell-var-from-loop", # B023
|
|
213
|
+
# "dangerous-default-value", # B006, ruff catches new occurrences, needs more work
|
|
214
|
+
"duplicate-except", # B014
|
|
215
|
+
"duplicate-key", # F601
|
|
216
|
+
"duplicate-string-formatting-argument", # F
|
|
217
|
+
"duplicate-value", # F
|
|
218
|
+
"eval-used", # S307
|
|
219
|
+
"exec-used", # S102
|
|
220
|
+
"expression-not-assigned", # B018
|
|
221
|
+
"f-string-without-interpolation", # F541
|
|
222
|
+
"forgotten-debug-statement", # T100
|
|
223
|
+
"format-string-without-interpolation", # F
|
|
224
|
+
# "global-statement", # PLW0603, ruff catches new occurrences, needs more work
|
|
225
|
+
"global-variable-not-assigned", # PLW0602
|
|
226
|
+
"implicit-str-concat", # ISC001
|
|
227
|
+
"import-self", # PLW0406
|
|
228
|
+
"inconsistent-quotes", # Q000
|
|
229
|
+
"invalid-envvar-default", # PLW1508
|
|
230
|
+
"keyword-arg-before-vararg", # B026
|
|
231
|
+
"logging-format-interpolation", # G
|
|
232
|
+
"logging-fstring-interpolation", # G
|
|
233
|
+
"logging-not-lazy", # G
|
|
234
|
+
"misplaced-future", # F404
|
|
235
|
+
"named-expr-without-context", # PLW0131
|
|
236
|
+
"nested-min-max", # PLW3301
|
|
237
|
+
"pointless-statement", # B018
|
|
238
|
+
"raise-missing-from", # B904
|
|
239
|
+
"redefined-builtin", # A001
|
|
240
|
+
"try-except-raise", # TRY302
|
|
241
|
+
"unused-argument", # ARG001, we don't use it
|
|
242
|
+
"unused-format-string-argument", #F507
|
|
243
|
+
"unused-format-string-key", # F504
|
|
244
|
+
"unused-import", # F401
|
|
245
|
+
"unused-variable", # F841
|
|
246
|
+
"useless-else-on-loop", # PLW0120
|
|
247
|
+
"wildcard-import", # F403
|
|
248
|
+
"bad-classmethod-argument", # N804
|
|
249
|
+
"consider-iterating-dictionary", # SIM118
|
|
250
|
+
"empty-docstring", # D419
|
|
251
|
+
"invalid-name", # N815
|
|
252
|
+
"line-too-long", # E501, disabled globally
|
|
253
|
+
"missing-class-docstring", # D101
|
|
254
|
+
"missing-final-newline", # W292
|
|
255
|
+
"missing-function-docstring", # D103
|
|
256
|
+
"missing-module-docstring", # D100
|
|
257
|
+
"multiple-imports", #E401
|
|
258
|
+
"singleton-comparison", # E711, E712
|
|
259
|
+
"subprocess-run-check", # PLW1510
|
|
260
|
+
"superfluous-parens", # UP034
|
|
261
|
+
"ungrouped-imports", # I001
|
|
262
|
+
"unidiomatic-typecheck", # E721
|
|
263
|
+
"unnecessary-direct-lambda-call", # PLC3002
|
|
264
|
+
"unnecessary-lambda-assignment", # PLC3001
|
|
265
|
+
"unnecessary-pass", # PIE790
|
|
266
|
+
"unneeded-not", # SIM208
|
|
267
|
+
"useless-import-alias", # PLC0414
|
|
268
|
+
"wrong-import-order", # I001
|
|
269
|
+
"wrong-import-position", # E402
|
|
270
|
+
"comparison-of-constants", # PLR0133
|
|
271
|
+
"comparison-with-itself", # PLR0124
|
|
272
|
+
"consider-merging-isinstance", # PLR1701
|
|
273
|
+
"consider-using-dict-comprehension", # C402
|
|
274
|
+
"consider-using-generator", # C417
|
|
275
|
+
"consider-using-get", # SIM401
|
|
276
|
+
"consider-using-set-comprehension", # C401
|
|
277
|
+
"consider-using-sys-exit", # PLR1722
|
|
278
|
+
"consider-using-ternary", # SIM108
|
|
279
|
+
"literal-comparison", # F632
|
|
280
|
+
"property-with-parameters", # PLR0206
|
|
281
|
+
"super-with-arguments", # UP008
|
|
282
|
+
"too-many-branches", # PLR0912
|
|
283
|
+
"too-many-return-statements", # PLR0911
|
|
284
|
+
"too-many-statements", # PLR0915
|
|
285
|
+
"trailing-comma-tuple", # COM818
|
|
286
|
+
"unnecessary-comprehension", # C416
|
|
287
|
+
"use-a-generator", # C417
|
|
288
|
+
"use-dict-literal", # C406
|
|
289
|
+
"use-list-literal", # C405
|
|
290
|
+
"useless-object-inheritance", # UP004
|
|
291
|
+
"useless-return", # PLR1711
|
|
292
|
+
"no-else-break", # RET508
|
|
293
|
+
"no-else-continue", # RET507
|
|
294
|
+
"no-else-raise", # RET506
|
|
295
|
+
"no-else-return", # RET505
|
|
296
|
+
"broad-except", # BLE001
|
|
297
|
+
"protected-access", # SLF001
|
|
298
|
+
"broad-exception-raised", # TRY002
|
|
299
|
+
"consider-using-f-string", # PLC0209
|
|
300
|
+
# "no-self-use", # PLR6301 # Optional plugin, not enabled
|
|
301
|
+
|
|
302
|
+
# Handled by mypy
|
|
303
|
+
# Ref: <https://github.com/antonagestam/pylint-mypy-overlap>
|
|
304
|
+
"abstract-class-instantiated",
|
|
305
|
+
"arguments-differ",
|
|
306
|
+
"assigning-non-slot",
|
|
307
|
+
"assignment-from-no-return",
|
|
308
|
+
"assignment-from-none",
|
|
309
|
+
"bad-exception-cause",
|
|
310
|
+
"bad-format-character",
|
|
311
|
+
"bad-reversed-sequence",
|
|
312
|
+
"bad-super-call",
|
|
313
|
+
"bad-thread-instantiation",
|
|
314
|
+
"catching-non-exception",
|
|
315
|
+
"comparison-with-callable",
|
|
316
|
+
"deprecated-class",
|
|
317
|
+
"dict-iter-missing-items",
|
|
318
|
+
"format-combined-specification",
|
|
319
|
+
"global-variable-undefined",
|
|
320
|
+
"import-error",
|
|
321
|
+
"inconsistent-mro",
|
|
322
|
+
"inherit-non-class",
|
|
323
|
+
"init-is-generator",
|
|
324
|
+
"invalid-class-object",
|
|
325
|
+
"invalid-enum-extension",
|
|
326
|
+
"invalid-envvar-value",
|
|
327
|
+
"invalid-format-returned",
|
|
328
|
+
"invalid-hash-returned",
|
|
329
|
+
"invalid-metaclass",
|
|
330
|
+
"invalid-overridden-method",
|
|
331
|
+
"invalid-repr-returned",
|
|
332
|
+
"invalid-sequence-index",
|
|
333
|
+
"invalid-slice-index",
|
|
334
|
+
"invalid-slots-object",
|
|
335
|
+
"invalid-slots",
|
|
336
|
+
"invalid-star-assignment-target",
|
|
337
|
+
"invalid-str-returned",
|
|
338
|
+
"invalid-unary-operand-type",
|
|
339
|
+
"invalid-unicode-codec",
|
|
340
|
+
"isinstance-second-argument-not-valid-type",
|
|
341
|
+
"method-hidden",
|
|
342
|
+
"misplaced-format-function",
|
|
343
|
+
"missing-format-argument-key",
|
|
344
|
+
"missing-format-attribute",
|
|
345
|
+
"missing-kwoa",
|
|
346
|
+
"no-member",
|
|
347
|
+
"no-value-for-parameter",
|
|
348
|
+
"non-iterator-returned",
|
|
349
|
+
"non-str-assignment-to-dunder-name",
|
|
350
|
+
"nonlocal-and-global",
|
|
351
|
+
"not-a-mapping",
|
|
352
|
+
"not-an-iterable",
|
|
353
|
+
"not-async-context-manager",
|
|
354
|
+
"not-callable",
|
|
355
|
+
"not-context-manager",
|
|
356
|
+
"overridden-final-method",
|
|
357
|
+
"raising-bad-type",
|
|
358
|
+
"raising-non-exception",
|
|
359
|
+
"redundant-keyword-arg",
|
|
360
|
+
"relative-beyond-top-level",
|
|
361
|
+
"self-cls-assignment",
|
|
362
|
+
"signature-differs",
|
|
363
|
+
"star-needs-assignment-target",
|
|
364
|
+
"subclassed-final-class",
|
|
365
|
+
"super-without-brackets",
|
|
366
|
+
"too-many-function-args",
|
|
367
|
+
"typevar-double-variance",
|
|
368
|
+
"typevar-name-mismatch",
|
|
369
|
+
"unbalanced-dict-unpacking",
|
|
370
|
+
"unbalanced-tuple-unpacking",
|
|
371
|
+
"unexpected-keyword-arg",
|
|
372
|
+
"unhashable-member",
|
|
373
|
+
"unpacking-non-sequence",
|
|
374
|
+
"unsubscriptable-object",
|
|
375
|
+
"unsupported-assignment-operation",
|
|
376
|
+
"unsupported-binary-operation",
|
|
377
|
+
"unsupported-delete-operation",
|
|
378
|
+
"unsupported-membership-test",
|
|
379
|
+
"used-before-assignment",
|
|
380
|
+
"using-final-decorator-in-unsupported-version",
|
|
381
|
+
"wrong-exception-operation",
|
|
382
|
+
]
|
|
383
|
+
enable = [
|
|
384
|
+
#"useless-suppression", # temporarily every now and then to clean them up
|
|
385
|
+
"use-symbolic-message-instead",
|
|
386
|
+
]
|
|
387
|
+
|
|
388
|
+
[tool.mypy]
|
|
389
|
+
platform = "linux"
|
|
390
|
+
python_version = "3.11"
|
|
391
|
+
strict = true
|
|
392
|
+
namespace_packages = true
|
|
393
|
+
mypy_path = "src"
|
|
394
|
+
|
|
395
|
+
# show error messages from unrelated files
|
|
396
|
+
follow_imports = "normal"
|
|
397
|
+
|
|
398
|
+
# suppress errors about unsatisfied imports
|
|
399
|
+
ignore_missing_imports = true
|
|
400
|
+
|
|
401
|
+
# strict rules
|
|
402
|
+
check_untyped_defs = true
|
|
403
|
+
disallow_any_generics = true
|
|
404
|
+
disallow_incomplete_defs = true
|
|
405
|
+
disallow_subclassing_any = true
|
|
406
|
+
disallow_untyped_calls = true
|
|
407
|
+
disallow_untyped_decorators = true
|
|
408
|
+
disallow_untyped_defs = true
|
|
409
|
+
no_implicit_optional = true
|
|
410
|
+
no_implicit_reexport = true
|
|
411
|
+
strict_optional = true
|
|
412
|
+
warn_incomplete_stub = true
|
|
413
|
+
warn_no_return = true
|
|
414
|
+
warn_redundant_casts = true
|
|
415
|
+
warn_return_any = true
|
|
416
|
+
warn_unused_configs = true
|
|
417
|
+
warn_unused_ignores = true
|
|
418
|
+
|
|
419
|
+
|
|
420
|
+
[tool.coverage.report]
|
|
421
|
+
show_missing = true
|
|
422
|
+
fail_under = 50
|
|
423
|
+
|
|
424
|
+
[tool.coverage.run]
|
|
425
|
+
plugins = ["covdefaults"]
|
|
426
|
+
source = ["aioautomower"]
|