-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
151 lines (127 loc) · 3.05 KB
/
pyproject.toml
File metadata and controls
151 lines (127 loc) · 3.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
[build-system]
build-backend = 'setuptools.build_meta'
requires = ['setuptools', 'setuptools_scm[toml]']
[tool.setuptools_scm]
[tool.setuptools.package-data]
bluetracker = [
'py.typed',
'config.toml',
]
[project]
description = 'Monitor Bluetooth Classic devices and integrate them into Home Assistant via MQTT.'
name = 'bluetracker-hass-mqtt'
authors = [{name = 'essel-dev'}]
classifiers = [
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Typing :: Typed',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX :: Linux',
]
dynamic = ['version']
keywords = [
'device tracker',
'bluetooth classic',
'home assistant',
'raspberry pi',
'mqtt',
]
license = {file = 'LICENSE'}
readme = 'README.rst'
requires-python = '>=3.11'
dependencies = [
'paho-mqtt == 2.1.*',
'requests == 2.32.*',
]
[project.scripts]
bluetracker = 'bluetracker.__main__:main'
[project.urls]
'Bug Tracker' = 'https://github.com/essel-dev/bluetracker-hass-mqtt/issues'
'Changelog' = 'https://github.com/essel-dev/bluetracker-hass-mqtt/releases'
'Documentation' = 'https://bluetracker-hass-mqtt.readthedocs.io/'
'GitHub' = 'https://github.com/essel-dev/bluetracker-hass-mqtt'
[project.optional-dependencies]
dev = [
'pre-commit',
'tox',
'sphinx',
'sphinx-rtd-theme',
'sphinx_copybutton',
]
[tool.tox]
legacy_tox_ini = """
[tox]
envlist =
py{311,312}
ruff-format
ruff-lint
mypy
darglint
pre-commit
docs
[testenv]
package = wheel
wheel_build_env = .pkg
deps = coverage
commands =
coverage run -m unittest discover
py312: coverage report -m
[testenv:ruff-lint]
deps = ruff
commands = ruff check --fix
[testenv:ruff-format]
deps = ruff
commands = ruff format
[testenv:mypy]
deps = mypy
commands = mypy --install-types --non-interactive
[testenv:darglint]
deps = darglint
commands = darglint -s google src
[testenv:pre-commit]
deps = pre-commit
commands = pre-commit run --all-files
[testenv:docs]
changedir=docs/source
deps =
sphinx
sphinx-rtd-theme
sphinx-copybutton
allowlist_externals = make
commands = sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html
[gh-actions]
python =
3.11: py311
3.12: py312, ruff-lint, ruff-format, mypy, darglint
"""
[tool.coverage.run]
source = [
'src',
]
[tool.ruff.lint]
ignore = [
'PT', # pytest
]
select = [
'ALL',
]
[tool.ruff.lint.per-file-ignores]
'docs/source/conf.py' = ['INP001'] # __init__.py missing
'src/bluetracker/__main__.py' = ['T201'] # print
'tests/unit/bluetracker/test_core.py' = ['SLF001'] # Private member accessed
'tests/unit/bluetracker/utils/test_mqtt_messages.py' = ['SLF001'] # Private member accessed
[tool.ruff.lint.flake8-quotes]
inline-quotes = 'single'
[tool.ruff.lint.pydocstyle]
convention = 'google'
[tool.ruff.format]
docstring-code-format = true
quote-style = 'single'
[tool.mypy]
enable_error_code = ['ignore-without-code', 'redundant-expr', 'truthy-bool']
explicit_package_bases = true
files = 'src, tests'
namespace_packages = true
show_error_codes = true
strict = true
warn_unreachable = true