python-ember-mug 1.1.0b1__tar.gz → 1.2.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.
- {python_ember_mug-1.1.0b1 → python_ember_mug-1.2.0}/PKG-INFO +18 -15
- {python_ember_mug-1.1.0b1 → python_ember_mug-1.2.0}/README.md +5 -5
- {python_ember_mug-1.1.0b1 → python_ember_mug-1.2.0}/ember_mug/__init__.py +1 -1
- {python_ember_mug-1.1.0b1 → python_ember_mug-1.2.0}/ember_mug/__main__.py +1 -0
- {python_ember_mug-1.1.0b1 → python_ember_mug-1.2.0}/ember_mug/cli/__init__.py +1 -0
- {python_ember_mug-1.1.0b1 → python_ember_mug-1.2.0}/ember_mug/cli/commands.py +1 -0
- {python_ember_mug-1.1.0b1 → python_ember_mug-1.2.0}/ember_mug/cli/helpers.py +1 -0
- {python_ember_mug-1.1.0b1 → python_ember_mug-1.2.0}/ember_mug/consts.py +6 -5
- {python_ember_mug-1.1.0b1 → python_ember_mug-1.2.0}/ember_mug/data.py +1 -0
- {python_ember_mug-1.1.0b1 → python_ember_mug-1.2.0}/ember_mug/formatting.py +1 -0
- {python_ember_mug-1.1.0b1 → python_ember_mug-1.2.0}/ember_mug/mug.py +2 -1
- {python_ember_mug-1.1.0b1 → python_ember_mug-1.2.0}/ember_mug/scanner.py +17 -6
- {python_ember_mug-1.1.0b1 → python_ember_mug-1.2.0}/ember_mug/utils.py +4 -3
- {python_ember_mug-1.1.0b1 → python_ember_mug-1.2.0}/pyproject.toml +40 -41
- python_ember_mug-1.1.0b1/tests/__init__.py +0 -1
- python_ember_mug-1.1.0b1/tests/cli/__init__.py +0 -1
- python_ember_mug-1.1.0b1/tests/cli/test_commands.py +0 -379
- python_ember_mug-1.1.0b1/tests/cli/test_helpers.py +0 -91
- python_ember_mug-1.1.0b1/tests/conftest.py +0 -98
- python_ember_mug-1.1.0b1/tests/test_connection.py +0 -583
- python_ember_mug-1.1.0b1/tests/test_consts.py +0 -32
- python_ember_mug-1.1.0b1/tests/test_data.py +0 -114
- python_ember_mug-1.1.0b1/tests/test_formatting.py +0 -23
- python_ember_mug-1.1.0b1/tests/test_mug_data.py +0 -119
- python_ember_mug-1.1.0b1/tests/test_scanner.py +0 -62
- python_ember_mug-1.1.0b1/tests/test_utils.py +0 -223
- {python_ember_mug-1.1.0b1 → python_ember_mug-1.2.0}/.gitignore +0 -0
- {python_ember_mug-1.1.0b1 → python_ember_mug-1.2.0}/LICENSE +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: python-ember-mug
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.2.0
|
|
4
4
|
Summary: Python Library for Ember Mugs.
|
|
5
|
+
Project-URL: Changelog, https://sopelj.github.io/python-ember-mug/changelog/
|
|
5
6
|
Project-URL: Documentation, https://sopelj.github.io/python-ember-mug/
|
|
6
7
|
Project-URL: Source code, https://github.com/sopelj/python-ember-mug/
|
|
7
8
|
Project-URL: Bug Tracker, https://github.com/sopelj/python-ember-mug/issues
|
|
8
|
-
|
|
9
|
-
Author-email: Jesse Sopel <jesse.sopel@gmail.com>
|
|
9
|
+
Author-email: Jesse Sopel <jesse@sopelj.ca>
|
|
10
10
|
License-Expression: MIT
|
|
11
11
|
License-File: LICENSE
|
|
12
12
|
Classifier: Intended Audience :: Developers
|
|
@@ -15,20 +15,23 @@ Classifier: Natural Language :: English
|
|
|
15
15
|
Classifier: Programming Language :: Python :: 3
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.11
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
19
|
Requires-Python: >=3.11
|
|
19
20
|
Requires-Dist: bleak-retry-connector>=3.5.0
|
|
20
|
-
Requires-Dist: bleak>=0.22.2
|
|
21
|
+
Requires-Dist: bleak>=0.22.2; python_version < '3.13'
|
|
22
|
+
Requires-Dist: bleak>=0.22.3; python_version <= '3.13'
|
|
23
|
+
Provides-Extra: dev
|
|
24
|
+
Requires-Dist: ipython; extra == 'dev'
|
|
21
25
|
Provides-Extra: docs
|
|
22
26
|
Requires-Dist: black; extra == 'docs'
|
|
23
27
|
Requires-Dist: mkdocs-autorefs; extra == 'docs'
|
|
24
28
|
Requires-Dist: mkdocs-gen-files; extra == 'docs'
|
|
25
|
-
Requires-Dist: mkdocs-include-markdown-plugin<8.0.0,>=
|
|
29
|
+
Requires-Dist: mkdocs-include-markdown-plugin<8.0.0,>=7.0.0; extra == 'docs'
|
|
26
30
|
Requires-Dist: mkdocs-literate-nav; extra == 'docs'
|
|
27
31
|
Requires-Dist: mkdocs-material-extensions; extra == 'docs'
|
|
28
|
-
Requires-Dist: mkdocs-material<10.0.0,>=
|
|
29
|
-
Requires-Dist: mkdocs>=1.1
|
|
30
|
-
Requires-Dist: mkdocstrings-python; extra == 'docs'
|
|
31
|
-
Requires-Dist: mkdocstrings[python]; extra == 'docs'
|
|
32
|
+
Requires-Dist: mkdocs-material<10.0.0,>=9.5.44; extra == 'docs'
|
|
33
|
+
Requires-Dist: mkdocs>=1.6.1; extra == 'docs'
|
|
34
|
+
Requires-Dist: mkdocstrings-python>=1.12.0; extra == 'docs'
|
|
32
35
|
Requires-Dist: termynal; extra == 'docs'
|
|
33
36
|
Provides-Extra: test
|
|
34
37
|
Requires-Dist: pytest-asyncio; extra == 'test'
|
|
@@ -42,16 +45,16 @@ Description-Content-Type: text/markdown
|
|
|
42
45
|
[](https://pypi.org/project/python-ember-mug/)
|
|
43
46
|
[](https://github.com/sopelj/python-ember-mug/actions/workflows/tests.yml)
|
|
44
47
|
[](https://codecov.io/gh/sopelj/python-ember-mug)
|
|
45
|
-

|
|
46
49
|
[](https://github.com/sopelj)
|
|
47
50
|
[](https://github.com/sopelj/python-ember-mug/blob/main/LICENSE)
|
|
48
51
|
[](https://github.com/pre-commit/pre-commit)
|
|
49
52
|
|
|
50
53
|
Python Library for interacting with Ember Mugs, Cups, and Travel Mugs via Bluetooth
|
|
51
54
|
|
|
52
|
-
* [Documentation](https://sopelj.github.io/python-ember-mug)
|
|
53
|
-
* [GitHub](https://github.com/sopelj/python-ember-mug)
|
|
54
|
-
* [PyPI](https://pypi.org/project/python-ember-mug/)
|
|
55
|
+
* [📘 Documentation](https://sopelj.github.io/python-ember-mug)
|
|
56
|
+
* [💻 GitHub](https://github.com/sopelj/python-ember-mug)
|
|
57
|
+
* [🐍 PyPI](https://pypi.org/project/python-ember-mug/)
|
|
55
58
|
|
|
56
59
|
## Summary
|
|
57
60
|
|
|
@@ -123,7 +126,7 @@ async with mug.connection():
|
|
|
123
126
|
print(mug.data.formatted)
|
|
124
127
|
```
|
|
125
128
|
|
|
126
|
-
### CLI
|
|
129
|
+
### CLI Mode
|
|
127
130
|
|
|
128
131
|
It can also be run via command line either directly with `ember-mug --help` or as a module with `python -m ember_mug --help`
|
|
129
132
|
There are four options with different subsections. You can see them by specifying them before help. eg `ember-mug poll --help`
|
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
[](https://pypi.org/project/python-ember-mug/)
|
|
5
5
|
[](https://github.com/sopelj/python-ember-mug/actions/workflows/tests.yml)
|
|
6
6
|
[](https://codecov.io/gh/sopelj/python-ember-mug)
|
|
7
|
-

|
|
8
8
|
[](https://github.com/sopelj)
|
|
9
9
|
[](https://github.com/sopelj/python-ember-mug/blob/main/LICENSE)
|
|
10
10
|
[](https://github.com/pre-commit/pre-commit)
|
|
11
11
|
|
|
12
12
|
Python Library for interacting with Ember Mugs, Cups, and Travel Mugs via Bluetooth
|
|
13
13
|
|
|
14
|
-
* [Documentation](https://sopelj.github.io/python-ember-mug)
|
|
15
|
-
* [GitHub](https://github.com/sopelj/python-ember-mug)
|
|
16
|
-
* [PyPI](https://pypi.org/project/python-ember-mug/)
|
|
14
|
+
* [📘 Documentation](https://sopelj.github.io/python-ember-mug)
|
|
15
|
+
* [💻 GitHub](https://github.com/sopelj/python-ember-mug)
|
|
16
|
+
* [🐍 PyPI](https://pypi.org/project/python-ember-mug/)
|
|
17
17
|
|
|
18
18
|
## Summary
|
|
19
19
|
|
|
@@ -85,7 +85,7 @@ async with mug.connection():
|
|
|
85
85
|
print(mug.data.formatted)
|
|
86
86
|
```
|
|
87
87
|
|
|
88
|
-
### CLI
|
|
88
|
+
### CLI Mode
|
|
89
89
|
|
|
90
90
|
It can also be run via command line either directly with `ember-mug --help` or as a module with `python -m ember_mug --help`
|
|
91
91
|
There are four options with different subsections. You can see them by specifying them before help. eg `ember-mug poll --help`
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"""Bluetooth UUIDs and other constants used for communicating with the mug."""
|
|
2
|
+
|
|
2
3
|
from __future__ import annotations
|
|
3
4
|
|
|
4
5
|
import platform
|
|
5
6
|
import re
|
|
6
7
|
from enum import Enum, IntEnum
|
|
7
8
|
from functools import cached_property
|
|
8
|
-
from typing import
|
|
9
|
+
from typing import NamedTuple
|
|
9
10
|
from uuid import UUID
|
|
10
11
|
|
|
11
12
|
# Format for all the mug's Bluetooth UUIDs
|
|
@@ -68,8 +69,8 @@ class DeviceColour(str, Enum):
|
|
|
68
69
|
class TemperatureUnit(str, Enum):
|
|
69
70
|
"""Temperature Units."""
|
|
70
71
|
|
|
71
|
-
CELSIUS
|
|
72
|
-
FAHRENHEIT
|
|
72
|
+
CELSIUS = "°C"
|
|
73
|
+
FAHRENHEIT = "°F"
|
|
73
74
|
|
|
74
75
|
|
|
75
76
|
class MinMaxTemp(NamedTuple):
|
|
@@ -148,10 +149,10 @@ TRAVEL_MUG_SERVICE_UUIDS = (
|
|
|
148
149
|
str(MugCharacteristic.TRAVEL_MUG_SERVICE_OTHER),
|
|
149
150
|
)
|
|
150
151
|
|
|
151
|
-
DEVICE_SERVICE_UUIDS =
|
|
152
|
+
DEVICE_SERVICE_UUIDS = [
|
|
152
153
|
str(MugCharacteristic.STANDARD_SERVICE),
|
|
153
154
|
*TRAVEL_MUG_SERVICE_UUIDS,
|
|
154
|
-
|
|
155
|
+
]
|
|
155
156
|
|
|
156
157
|
|
|
157
158
|
class LiquidState(IntEnum):
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"""Objects and methods related to connection to the mug."""
|
|
2
|
+
|
|
2
3
|
from __future__ import annotations
|
|
3
4
|
|
|
4
5
|
import asyncio
|
|
@@ -157,7 +158,7 @@ class EmberMug:
|
|
|
157
158
|
if self.debug is True:
|
|
158
159
|
await discover_services(client)
|
|
159
160
|
self._expected_disconnect = False
|
|
160
|
-
except (
|
|
161
|
+
except (TimeoutError, BleakError) as error:
|
|
161
162
|
logger.debug("%s: Failed to connect to the mug: %s", self.device, error)
|
|
162
163
|
raise error
|
|
163
164
|
# Attempt to pair for good measure
|
|
@@ -1,32 +1,41 @@
|
|
|
1
1
|
"""Scanning tools for finding mugs."""
|
|
2
|
+
|
|
2
3
|
from __future__ import annotations
|
|
3
4
|
|
|
4
5
|
import asyncio
|
|
5
6
|
import contextlib
|
|
6
7
|
import logging
|
|
7
|
-
from typing import TYPE_CHECKING,
|
|
8
|
+
from typing import TYPE_CHECKING, cast
|
|
8
9
|
|
|
9
10
|
from bleak import BleakScanner
|
|
10
11
|
|
|
11
12
|
from .consts import DEVICE_SERVICE_UUIDS, IS_LINUX
|
|
12
13
|
|
|
13
14
|
if TYPE_CHECKING:
|
|
15
|
+
from typing import NotRequired, TypedDict
|
|
16
|
+
|
|
14
17
|
from bleak.backends.device import BLEDevice
|
|
15
18
|
from bleak.backends.scanner import AdvertisementData
|
|
16
19
|
|
|
20
|
+
class ScannerKwargs(TypedDict):
|
|
21
|
+
"""Optional kwargs for scanner."""
|
|
22
|
+
|
|
23
|
+
adapter: NotRequired[str]
|
|
24
|
+
service_uuids: NotRequired[list[str]]
|
|
25
|
+
|
|
17
26
|
|
|
18
27
|
DEFAULT_TIMEOUT = 30
|
|
19
28
|
|
|
20
29
|
logger = logging.getLogger(__name__)
|
|
21
30
|
|
|
22
31
|
|
|
23
|
-
def build_scanner_kwargs(adapter: str | None = None
|
|
32
|
+
def build_scanner_kwargs(adapter: str | None = None, *, service_uuids: list[str] | None = None) -> ScannerKwargs:
|
|
24
33
|
"""Add Adapter to kwargs for scanner if specified and using BlueZ."""
|
|
25
34
|
if adapter and IS_LINUX is not True:
|
|
26
35
|
msg = "The adapter option is only valid for the Linux BlueZ Backend."
|
|
27
36
|
raise ValueError(msg)
|
|
28
|
-
kwargs = {"service_uuids":
|
|
29
|
-
return kwargs | {"adapter": adapter} if adapter else kwargs
|
|
37
|
+
kwargs = {"service_uuids": service_uuids} if service_uuids else {}
|
|
38
|
+
return cast("ScannerKwargs", kwargs | {"adapter": adapter} if adapter else kwargs)
|
|
30
39
|
|
|
31
40
|
|
|
32
41
|
async def discover_devices(
|
|
@@ -44,8 +53,9 @@ async def discover_devices(
|
|
|
44
53
|
for device, advertisement in devices:
|
|
45
54
|
print(device.address, advertisement)
|
|
46
55
|
```
|
|
56
|
+
|
|
47
57
|
"""
|
|
48
|
-
async with BleakScanner(**build_scanner_kwargs(adapter)) as scanner:
|
|
58
|
+
async with BleakScanner(**build_scanner_kwargs(adapter, service_uuids=DEVICE_SERVICE_UUIDS)) as scanner:
|
|
49
59
|
await asyncio.sleep(wait)
|
|
50
60
|
return [
|
|
51
61
|
(d, a)
|
|
@@ -57,7 +67,7 @@ async def discover_devices(
|
|
|
57
67
|
async def find_device(
|
|
58
68
|
mac: str | None = None,
|
|
59
69
|
adapter: str | None = None,
|
|
60
|
-
timeout: int = DEFAULT_TIMEOUT,
|
|
70
|
+
timeout: int = DEFAULT_TIMEOUT, # noqa: ASYNC109
|
|
61
71
|
) -> tuple[BLEDevice, AdvertisementData] | tuple[None, None]:
|
|
62
72
|
"""
|
|
63
73
|
Find a device that has previously been discovered.
|
|
@@ -67,6 +77,7 @@ async def find_device(
|
|
|
67
77
|
```python
|
|
68
78
|
device = await find_device("my:mac:addr")
|
|
69
79
|
```
|
|
80
|
+
|
|
70
81
|
"""
|
|
71
82
|
if mac is not None:
|
|
72
83
|
mac = mac.lower()
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"""Helpful utils for processing mug data."""
|
|
2
|
+
|
|
2
3
|
from __future__ import annotations
|
|
3
4
|
|
|
4
5
|
import base64
|
|
@@ -96,11 +97,11 @@ def get_model_from_single_int_and_services( # noqa PLR0911
|
|
|
96
97
|
return DeviceModel.MUG_1_10_OZ
|
|
97
98
|
if model_id == 65:
|
|
98
99
|
return DeviceModel.MUG_1_14_OZ
|
|
99
|
-
if model_id in (-63, -61, -62):
|
|
100
|
+
if model_id in (-51, -63, -61, -62):
|
|
100
101
|
return DeviceModel.MUG_2_14_OZ
|
|
101
102
|
if model_id == -60:
|
|
102
103
|
return DeviceModel.CUP_6_OZ
|
|
103
|
-
if model_id in (-127, -126, -125, -124, -123, -122, -120, -117, -57, -56, -55, -53, -52,
|
|
104
|
+
if model_id in (-127, -126, -125, -124, -123, -122, -120, -117, -57, -56, -55, -53, -52, 83, 131):
|
|
104
105
|
return DeviceModel.MUG_2_10_OZ
|
|
105
106
|
return None
|
|
106
107
|
|
|
@@ -133,7 +134,7 @@ def guess_model_from_name(name: str | None) -> DeviceModel | None:
|
|
|
133
134
|
|
|
134
135
|
def get_model_info_from_advertiser_data(advertisement: AdvertisementData) -> ModelInfo:
|
|
135
136
|
"""Extract model info from manufacturer data in advertiser data."""
|
|
136
|
-
from ember_mug.data import ModelInfo
|
|
137
|
+
from ember_mug.data import ModelInfo # noqa: PLC0415
|
|
137
138
|
|
|
138
139
|
model_data = advertisement.manufacturer_data.get(EMBER_BLE_SIG, None)
|
|
139
140
|
if model_data is not None:
|
|
@@ -1,53 +1,47 @@
|
|
|
1
|
-
[tool]
|
|
2
|
-
|
|
3
1
|
[project]
|
|
4
2
|
name = "python-ember-mug"
|
|
5
3
|
readme = "README.md"
|
|
6
4
|
description = "Python Library for Ember Mugs."
|
|
7
|
-
authors = [
|
|
8
|
-
|
|
9
|
-
]
|
|
10
|
-
license = "MIT"
|
|
5
|
+
authors = [{ name = "Jesse Sopel", email = "jesse@sopelj.ca" }]
|
|
6
|
+
license = "MIT"
|
|
11
7
|
requires-python = ">=3.11"
|
|
12
8
|
dynamic = ["version"]
|
|
13
|
-
classifiers=[
|
|
9
|
+
classifiers = [
|
|
14
10
|
'Intended Audience :: Developers',
|
|
15
11
|
'License :: OSI Approved :: MIT License',
|
|
16
12
|
'Natural Language :: English',
|
|
17
13
|
'Programming Language :: Python :: 3',
|
|
18
14
|
'Programming Language :: Python :: 3.11',
|
|
19
15
|
'Programming Language :: Python :: 3.12',
|
|
16
|
+
'Programming Language :: Python :: 3.13',
|
|
20
17
|
]
|
|
21
18
|
dependencies = [
|
|
22
19
|
"bleak-retry-connector>=3.5.0",
|
|
23
|
-
"bleak>=0.22.2",
|
|
20
|
+
"bleak>=0.22.2; python_version < '3.13'",
|
|
21
|
+
"bleak>=0.22.3; python_version <= '3.13'",
|
|
24
22
|
]
|
|
25
23
|
|
|
26
24
|
[project.optional-dependencies]
|
|
27
|
-
test = [
|
|
28
|
-
"pytest>=7.2.1",
|
|
29
|
-
"pytest-cov",
|
|
30
|
-
"pytest-asyncio",
|
|
31
|
-
]
|
|
25
|
+
test = ["pytest>=7.2.1", "pytest-cov", "pytest-asyncio"]
|
|
32
26
|
docs = [
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"termynal",
|
|
27
|
+
"mkdocs>=1.6.1",
|
|
28
|
+
"mkdocs-include-markdown-plugin>=7.0.0,<8.0.0",
|
|
29
|
+
"mkdocs-material>=9.5.44,<10.0.0",
|
|
30
|
+
"mkdocs-material-extensions",
|
|
31
|
+
"mkdocstrings-python>=1.12.0",
|
|
32
|
+
"mkdocs-autorefs",
|
|
33
|
+
"mkdocs-literate-nav",
|
|
34
|
+
"mkdocs-gen-files",
|
|
35
|
+
"black",
|
|
36
|
+
"termynal",
|
|
44
37
|
]
|
|
38
|
+
dev = ["ipython"]
|
|
45
39
|
|
|
46
40
|
[project.urls]
|
|
41
|
+
"Changelog" = "https://sopelj.github.io/python-ember-mug/changelog/"
|
|
47
42
|
"Documentation" = "https://sopelj.github.io/python-ember-mug/"
|
|
48
43
|
"Source code" = "https://github.com/sopelj/python-ember-mug/"
|
|
49
44
|
"Bug Tracker" = "https://github.com/sopelj/python-ember-mug/issues"
|
|
50
|
-
"Changelog" = "https://github.com/sopelj/python-ember-mug/blob/main/CHANGELOG.md"
|
|
51
45
|
|
|
52
46
|
[project.scripts]
|
|
53
47
|
ember-mug = "ember_mug.cli:run_cli"
|
|
@@ -61,12 +55,15 @@ build-backend = "hatchling.build"
|
|
|
61
55
|
[tool.hatch.version]
|
|
62
56
|
path = "ember_mug/__init__.py"
|
|
63
57
|
|
|
58
|
+
[tool.hatch.build]
|
|
59
|
+
exclude = ["/docs", "/tests"]
|
|
60
|
+
|
|
64
61
|
[tool.hatch.build.targets.sdist]
|
|
65
|
-
packages = ["ember_mug"
|
|
62
|
+
packages = ["ember_mug"]
|
|
66
63
|
exclude = [".gitignore"]
|
|
67
64
|
|
|
68
65
|
[tool.hatch.build.targets.wheel]
|
|
69
|
-
packages = ["ember_mug"
|
|
66
|
+
packages = ["ember_mug"]
|
|
70
67
|
exclude = [".gitignore"]
|
|
71
68
|
|
|
72
69
|
[tool.hatch.envs.default]
|
|
@@ -76,14 +73,14 @@ python = "3.12"
|
|
|
76
73
|
features = ["test"]
|
|
77
74
|
|
|
78
75
|
[[tool.hatch.envs.test.matrix]]
|
|
79
|
-
python = ["3.11", "3.12"]
|
|
76
|
+
python = ["3.11", "3.12", "3.13"]
|
|
80
77
|
|
|
81
78
|
[tool.hatch.envs.test.scripts]
|
|
82
79
|
cov = "pytest -vvv --asyncio-mode=auto --cov=ember_mug --cov-branch --cov-report=xml --cov-report=term-missing tests"
|
|
83
80
|
no-cov = "cov --no-cov"
|
|
84
81
|
|
|
85
82
|
[tool.hatch.envs.docs]
|
|
86
|
-
python = "3.
|
|
83
|
+
python = "3.12"
|
|
87
84
|
features = ["docs"]
|
|
88
85
|
|
|
89
86
|
[tool.hatch.envs.docs.scripts]
|
|
@@ -110,21 +107,23 @@ exclude = '''
|
|
|
110
107
|
|
|
111
108
|
[tool.coverage.report]
|
|
112
109
|
exclude_lines = [
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
110
|
+
"pragma: no cover",
|
|
111
|
+
"def __repr__",
|
|
112
|
+
"def __str__",
|
|
113
|
+
"def main",
|
|
114
|
+
"raise AssertionError",
|
|
115
|
+
"raise NotImplementedError",
|
|
116
|
+
"if __name__ == .__main__.:",
|
|
117
|
+
"if TYPE_CHECKING:",
|
|
118
|
+
"if typing.TYPE_CHECKING:",
|
|
122
119
|
]
|
|
123
120
|
|
|
124
121
|
[tool.ruff]
|
|
125
122
|
fix = true
|
|
126
123
|
line-length = 120
|
|
127
124
|
target-version = "py311"
|
|
125
|
+
|
|
126
|
+
[tool.ruff.lint]
|
|
128
127
|
select = [
|
|
129
128
|
"A",
|
|
130
129
|
"ASYNC",
|
|
@@ -157,9 +156,9 @@ select = [
|
|
|
157
156
|
]
|
|
158
157
|
ignore = ["D203", "D212", "PLR2004"]
|
|
159
158
|
|
|
160
|
-
[tool.ruff.per-file-ignores]
|
|
159
|
+
[tool.ruff.lint.per-file-ignores]
|
|
161
160
|
"tests/**/*.py" = [
|
|
162
|
-
"D103",
|
|
163
|
-
"S101",
|
|
161
|
+
"D103", # No docstrings in tests needed
|
|
162
|
+
"S101", # We needs asserts in tests
|
|
164
163
|
"SLF001",
|
|
165
164
|
]
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"""Unit test package for python-ember-mug."""
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"""Tests for the CLI module."""
|