-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpyproject.toml
131 lines (116 loc) · 4.43 KB
/
pyproject.toml
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
[build-system]
requires = ["setuptools >= 40.6.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "smarthomeconnect"
version = "0.9.0"
description = "The Smart Home Connect home automation framework based on AsyncIO"
license = {file = "LICENSE"}
readme = { file = "README.md", content-type = "text/markdown" }
authors = [{name = "Michael Thies", email = "mail@mhthies.de"}]
requires-python = ">=3.7"
classifiers = [
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: Apache Software License",
"Topic :: Home Automation",
"Framework :: AsyncIO"
]
dependencies = [
"aiohttp>=3.6,<4",
"jinja2>=2.11,<4",
"MarkupSafe>=1.1,<3",
]
[project.urls]
Documentation = "https://smarthomeconnect.readthedocs.org/"
Source = "https://github.com/mhthies/smarthomeconnect"
Tracker = "https://github.com/mhthies/smarthomeconnect/issues"
[tool.setuptools]
license-files = ["LICENSE", "NOTICE"]
[tool.setuptools.packages.find]
include = ["shc.*"]
exclude = ["shc.web.tests"]
[tool.setuptools.package-data]
"shc.web" = ["static/pack/*"]
[project.optional-dependencies]
mysql = ["aiomysql>=0.0.21,<=0.2.0"]
knx = ["knxdclient>=0.4.0,<2"]
dmx = ["pyserial-asyncio>=0.3,<0.7"]
midi = ["mido>=1.2.9,<2", "python-rtmidi>=1.4.6,<2"]
mqtt = ["aiomqtt>=2.0.0,<3"]
pulse = ["pulsectl_asyncio>=1.0.0,<2"]
telegram = ["aiogram>=3.0,<4"]
file_persistence = ["aiofile>=3.7.4,<4"]
dev = ["ruff~=0.8"]
test = [
"coverage~=7.6",
"mypy~=1.13",
"selenium>=3.141,<5",
"types-PyMySQL",
"types-MarkupSafe>=1.1,<3",
"types-Jinja2>=2.11,<3",
]
doc = [
"sphinx~=5.0",
"sphinx-rtd-theme~=2.0",
"sphinx-toolbox~=3.5",
"sphinxcontrib-httpdomain~=1.8",
]
[tool.ruff]
line-length = 120
output-format = "concise"
include = ["shc/**/*.py", "test/**/*.py"]
exclude = ["test/assets"]
[tool.ruff.lint]
# Enable checks for Pycodestyle, Pyflakes, Bugbear, Docstrings and Import sorting
select = ["E", "F", "B", "D", "I"]
ignore = [
"B006", # Do not use mutable data structures for argument defaults
"B012", # `return` inside `finally` blocks cause exceptions to be silenced
"B023", # Function definition does not bind loop variable `spec`
"B024", # abstract base class, but it has no abstract methods or properties
"B027", # empty method in an abstract base class, but has no abstract decorator
"B028", # No explicit `stacklevel` keyword argument found
"B904", # Within an `except` clause, raise exceptions with `raise ... from err` or `raise ... from None` to distinguish them from errors in exception handling
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D104", # Missing docstring in public package
"D105", # Missing docstring in magic method
"D106", # Missing docstring in public nested class
"D107", # Ignore D107 Missing docstring
"D200", # One-line docstring should fit on one line
"D203", # Ignore one-blank-line-before-class as Black handles this
"D212", # Multi-line docstring summary should start at the first line
"D213", # Multi-line docstring summary should start at the second line
"D301", # Use `r"""` if any backslashes in a docstring
"D401", # First line of docstring should be in imperative mood
"D404", # First word of the docstring should not be "This"
# keep entries below (TBD)
"D204", # 1 blank line required after class docstring
"D205", # 1 blank line required between summary line and description
]
[tool.ruff.lint.per-file-ignores]
"*/__init__.py" = ["F401"]
"example/*" = ["F403", "F405"]
[tool.mypy]
files = ["shc/", "test/", "example/"]
disallow_untyped_decorators = true
warn_unreachable = true
check_untyped_defs = true
namespace_packages = false
plugins = ["shc/util/mypy_variable_plugin.py"]
exclude = "^test/assets/mypy_plugin_test"
[[tool.mypy.overrides]]
module = "mido,astropy,astropy.*,serial,serial_asyncio,paho.mqtt.*,selenium.*,pulsectl.*,pulsectl_asyncio,aiomysql,aiogram.*"
ignore_missing_imports = true
[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = "double"
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
[tool.isort]
profile = "black" # Use the "black" profile for import sorting consistency with Black
line_length = 120