-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merge config files and apply current rules
- Loading branch information
Showing
7 changed files
with
140 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,52 @@ requires = [ | |
] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "docker2mqtt" | ||
dynamic = ["version", "readme"] | ||
description = "Send your docker stats and and events to mqtt and discovery them in home assistant." | ||
authors = [ | ||
{ name = "Cyrill Raccaud", email = "[email protected]" }, | ||
] | ||
dependencies = [ | ||
"jsons", | ||
"psutil", | ||
"paho-mqtt", | ||
"numpy", | ||
"typing-extensions" | ||
] | ||
requires-python = ">=3.11" | ||
|
||
classifiers = [ | ||
"Programming Language :: Python :: 3", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
"Intended Audience :: Information Technology", | ||
"Topic :: System :: Monitoring", | ||
"Topic :: System :: Logging", | ||
"Topic :: System :: Systems Administration", | ||
] | ||
license = {text = "MIT License"} | ||
keywords = ["docker", "mqtt", "paho", "home-assistant", "system-monitoring", "discovery", "iot"] | ||
|
||
[tool.setuptools] | ||
packages = ["docker2mqtt"] | ||
|
||
[tool.setuptools.package-data] | ||
docker2mtt = ["py.typed"] | ||
|
||
[tool.setuptools.dynamic] | ||
version = {attr = "docker2mqtt.__version__"} | ||
readme = {file = ["README.md", "CHANGELOG.md"], content-type = "text/markdown"} | ||
|
||
[project.urls] | ||
Documentation = "https://miaucl.github.io/docker2mqtt/" | ||
Source = "https://github.com/miaucl/docker2mqtt" | ||
Issues = "https://github.com/miaucl/docker2mqtt/issues" | ||
|
||
[project.scripts] | ||
docker2mqtt = "docker2mqtt.docker2mqtt:main" | ||
|
||
[tool.ruff] | ||
|
||
target-version = "py312" | ||
|
@@ -69,7 +115,7 @@ select = [ | |
"TID251", # Banned imports | ||
"TRY004", # Prefer TypeError exception for invalid type | ||
"B904", # Use raise from to specify exception cause | ||
"TRY302", # Remove exception handler; error is immediately re-raised | ||
"TRY", # tryceratops | ||
"UP", # pyupgrade | ||
"W", # pycodestyle | ||
] | ||
|
@@ -96,10 +142,7 @@ ignore = [ | |
"PLR0915", # Too many statements ({statements} > {max_statements}) | ||
"PLR2004", # Magic value used in comparison, consider replacing {value} with a constant variable | ||
"PLW2901", # Outer {outer_kind} variable {name} overwritten by inner {inner_kind} target | ||
"UP006", # keep type annotation style as is | ||
"UP007", # keep type annotation style as is | ||
# Ignored due to performance: https://github.com/charliermarsh/ruff/issues/2923 | ||
"UP038", # Use `X | Y` in `isinstance` call instead of `(X, Y)` | ||
"TRY003", # Avoid specifying long messages outside the exception class | ||
|
||
# May conflict with the formatter, https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules | ||
"W191", | ||
|
@@ -145,3 +188,26 @@ split-on-trailing-comma = false | |
|
||
[tool.ruff.lint.mccabe] | ||
max-complexity = 25 | ||
|
||
[tool.mypy] | ||
python_version = "3.12" | ||
plugins = "pydantic.mypy" | ||
show_error_codes = true | ||
local_partial_types = true | ||
strict_equality = true | ||
no_implicit_optional = true | ||
warn_incomplete_stub = true | ||
warn_redundant_casts = true | ||
warn_unused_configs = true | ||
warn_unused_ignores = false | ||
enable_error_code = ["ignore-without-code", "redundant-self", "truthy-iterable"] | ||
disable_error_code = ["annotation-unchecked", "import-not-found", "import-untyped"] | ||
extra_checks = false | ||
check_untyped_defs = true | ||
disallow_incomplete_defs = true | ||
disallow_subclassing_any = true | ||
disallow_untyped_calls = true | ||
disallow_untyped_decorators = true | ||
disallow_untyped_defs = true | ||
warn_return_any = true | ||
warn_unreachable = true |
Oops, something went wrong.