@@ -9,13 +9,13 @@ name = "pytest-mqtt"
99version = " 0.4.2"
1010description = " pytest-mqtt supports testing systems based on MQTT"
1111readme = " README.rst"
12- requires-python = " >=3.7"
13- license = {text = " MIT" }
14- keywords = [" mqtt" , " pytest" , " testing" , " mosquitto" , " paho" ]
12+ keywords = [ " mosquitto" , " mqtt" , " paho" , " pytest" , " testing" ]
13+ license = { text = " MIT" }
1514authors = [
16- {
name =
" Andreas Motl" ,
email =
" [email protected] " },
17- {
name =
" Richard Pobering" ,
email =
" [email protected] " },
15+ {
name =
" Andreas Motl" ,
email =
" [email protected] " },
16+ {
name =
" Richard Pobering" ,
email =
" [email protected] " },
1817]
18+ requires-python = " >=3.7"
1919classifiers = [
2020 " Development Status :: 5 - Production/Stable" ,
2121 " Environment :: Console" ,
@@ -33,6 +33,7 @@ classifiers = [
3333 " Operating System :: POSIX :: Linux" ,
3434 " Operating System :: Unix" ,
3535 " Programming Language :: Python" ,
36+ " Programming Language :: Python :: 3 :: Only" ,
3637 " Programming Language :: Python :: 3.7" ,
3738 " Programming Language :: Python :: 3.8" ,
3839 " Programming Language :: Python :: 3.9" ,
@@ -61,79 +62,79 @@ dependencies = [
6162 " pytest-docker-fixtures<2" ,
6263]
6364
64- [project .entry-points .pytest11 ]
65- capmqtt = " pytest_mqtt.capmqtt"
66- mosquitto = " pytest_mqtt.mosquitto"
67-
68- [project .optional-dependencies ]
69- test = [
70- " coverage<8" ,
71- " pytest<9" ,
72- " pytest-fixture-order<1" ,
73- " pytest-ordering<1" ,
74- ]
75- develop = [
76- " isort<6" ,
77- " black<25" ,
65+ optional-dependencies.develop = [
66+ " mypy<1.12" ,
7867 " poethepoet<1" ,
68+ " pyproject-fmt<3" ,
7969 " ruff<0.9" ,
70+ " validate-pyproject<0.19" ,
8071]
81- release = [
72+ optional-dependencies. release = [
8273 " build<2" ,
8374 " twine<7" ,
8475]
76+ optional-dependencies.test = [
77+ " coverage<8" ,
78+ " pytest<9" ,
79+ " pytest-fixture-order<1" ,
80+ " pytest-ordering<1" ,
81+ ]
82+ urls.changelog = " https://github.com/mqtt-tools/pytest-mqtt/blob/main/CHANGES.rst"
83+ urls.documentation = " https://github.com/mqtt-tools/pytest-mqtt"
84+ urls.homepage = " https://github.com/mqtt-tools/pytest-mqtt"
85+ urls.repository = " https://github.com/mqtt-tools/pytest-mqtt"
86+ entry-points.pytest11.capmqtt = " pytest_mqtt.capmqtt"
87+ entry-points.pytest11.mosquitto = " pytest_mqtt.mosquitto"
8588
8689[tool .setuptools ]
8790# https://setuptools.pypa.io/en/latest/userguide/package_discovery.html
88- packages = [" pytest_mqtt" ]
89-
90- [project .urls ]
91- homepage = " https://github.com/mqtt-tools/pytest-mqtt"
92- documentation = " https://github.com/mqtt-tools/pytest-mqtt"
93- repository = " https://github.com/mqtt-tools/pytest-mqtt"
94- changelog = " https://github.com/mqtt-tools/pytest-mqtt/blob/main/CHANGES.rst"
95-
91+ packages = [ " pytest_mqtt" ]
9692
9793# ==================
9894# Tool configuration
9995# ==================
96+ # Configuration snippets for pytest, coverage, and ruff.
10097
101- # Configuration snippets for Black, isort, pytest, coverage, and ruff.
102-
103- [tool .black ]
98+ [tool .ruff ]
10499line-length = 120
105100
106- [tool .isort ]
107- profile = " black"
108- skip_glob = " **/site-packages/**"
109- skip_gitignore = false
110- # src_paths = ["pytest_mqtt", "testing"]
111-
112101[tool .pytest .ini_options ]
113102minversion = " 2.0"
114103addopts = """
115104 -rfEX -p pytester --strict-markers --verbosity=3
116105 """
117106log_level = " DEBUG"
118107log_cli_level = " DEBUG"
119- testpaths = [" testing" ]
108+ testpaths = [ " testing" ]
120109xfail_strict = true
121110markers = [
122111 " capmqtt_decode_utf8: Capture MQTT messages as `str`, not `bytes`" ,
123112]
124113
125114[tool .coverage .run ]
126115branch = false
127- source = [" pytest_mqtt" ]
116+ source = [ " pytest_mqtt" ]
128117
129118[tool .coverage .report ]
130119fail_under = 0
131120show_missing = true
132121omit = [
133122]
134123
135- [tool .ruff ]
136- line-length = 120
124+ [tool .mypy ]
125+ packages = [ " pytest_mqtt" ]
126+ exclude = [
127+ ]
128+ ignore_missing_imports = true
129+ check_untyped_defs = false
130+ implicit_optional = true
131+ install_types = true
132+ no_implicit_optional = true
133+ non_interactive = true
134+ show_error_codes = true
135+ strict_equality = true
136+ warn_unused_ignores = true
137+ warn_redundant_casts = true
137138
138139
139140# ===================
@@ -148,25 +149,30 @@ check = [
148149]
149150
150151format = [
151- {cmd =" black ." },
152- {cmd =" isort pytest_mqtt testing" },
152+ { cmd = " ruff format ." },
153+ # Configure Ruff not to auto-fix (remove!):
154+ # unused imports (F401), unused variables (F841), `print` statements (T201), and commented-out code (ERA001).
155+ { cmd = " ruff check --fix --ignore=ERA --ignore=F401 --ignore=F841 --ignore=T20 --ignore=ERA001 ." },
156+ { cmd = " pyproject-fmt --keep-full-version pyproject.toml" },
153157]
158+
154159lint = [
155- {cmd =" ruff check ." },
156- {cmd =" black --check ." },
157- {cmd =" isort --check pytest_mqtt testing" },
160+ { cmd = " ruff format --check ." },
161+ { cmd = " ruff check ." },
162+ { cmd = " validate-pyproject pyproject.toml" },
163+ { cmd = " mypy" },
158164]
159165
160166# When testing a pytest plugin, `coverage` needs to be
161167# started before `pytest`. `pytest-cov` will not work.
162168# https://stackoverflow.com/a/62224494
163169test = [
164- {cmd = " coverage run -m pytest" },
165- {cmd = " coverage report" },
166- {cmd = " coverage xml" },
170+ { cmd = " coverage run -m pytest" },
171+ { cmd = " coverage report" },
172+ { cmd = " coverage xml" },
167173]
168174
169175release = [
170- {cmd = " python -m build" },
171- {cmd = " twine upload --skip-existing dist/*.tar.gz dist/*.whl" },
176+ { cmd = " python -m build" },
177+ { cmd = " twine upload --skip-existing dist/*.tar.gz dist/*.whl" },
172178]
0 commit comments