-
Notifications
You must be signed in to change notification settings - Fork 2
/
pyproject.toml
153 lines (126 loc) · 3.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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
[tool.poetry]
name = "gogogate2_api"
version = "3.0.1"
description = "Library for connecting to GogoGate2 and iSmartGate hubs"
license = "MIT"
authors = [
"Robbie Van Gorkom <[email protected]>"
]
readme = 'README.md'
repository = "https://github.com/vangorra/python_gogogate2_api"
homepage = "https://github.com/vangorra/python_gogogate2_api"
keywords = ['gogogate2', 'ismartgate', 'api']
[tool.poetry.scripts]
gogogate2 = "gogogate2_api.cli:gogogate2_cli"
ismartgate = "gogogate2_api.cli:ismartgate_cli"
[tool.poetry.dependencies]
python = ">=3.8.1, <4"
defusedxml = ">=0.6.0"
pycryptodome = ">=3.9.7"
requests = ">=2.23.0"
typing-extensions = ">=3.7.4.2"
httpx = ">=0.16.1"
click = ">=7.1.2"
[tool.poetry.dev-dependencies]
autoflake = "==2.1.1"
bandit = "==1.7.5"
black = "==23.3.0"
codespell = "==2.2.5"
coverage = "==7.2.7"
dicttoxml2 = "==2.1.0"
flake8 = "==6.0.0"
isort = "==5.12.0"
mypy = "==1.4.0"
pylint = "==2.17.4"
pytest = "==7.4.0"
pytest-cov = "==4.1.0"
responses = "==0.23.1"
toml = "==0.10.2" # Needed by isort and others to parse this file.
wheel = "==0.40.0" # Needed for successful compile of other modules.
respx = ">=0.16.3"
pytest-asyncio = "^0.21.0"
asynctest = "^0.13.0"
[tool.black]
target-version = ["py38"]
exclude = '''
(
/(
\.eggs # exclude a few common directories in the
| \.git # root of the project
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| venv
| build
| _build
| buck-out
| build
| dist
)/
| foo.py # also separately exclude a file named foo.py in
# the root of the project
)
'''
[tool.isort]
# https://github.com/timothycrosley/isort
# https://github.com/timothycrosley/isort/wiki/isort-Settings
# splits long import on multiple lines indented by 4 spaces
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
line_length = 88
indent = " "
# by default isort don't check module indexes
not_skip = "__init__.py"
# will group `import obj` and `from obj import` of the same module.
force_sort_within_sections = true
sections = "FUTURE,STDLIB,INBETWEENS,THIRDPARTY,FIRSTPARTY,LOCALFOLDER"
default_section = "THIRDPARTY"
known_first_party = "homeassistant,tests"
forced_separate = "tests"
combine_as_imports = true
[tool.coverage.run]
branch = true
[tool.coverage.report]
fail_under = 98.0
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "--capture no --cov ./gogogate2_api --cov-report html:build/coverage_report --cov-report term --cov-report xml:build/coverage.xml"
[tool.pylint.MASTER]
jobs=4
[tool.pylint."MESSAGES CONTROL"]
# Reasons disabled:
# format - handled by black
# too-many-* - are not enforced for the sake of readability
# too-few-* - same as too-many-*
disable=[
"format",
"too-many-arguments",
"too-few-public-methods"
]
[tool.pylint.REPORTS]
reports = false
[tool.pylint.TYPECHECK]
# For attrs
ignored-classes="responses"
[tool.pylint.FORMAT]
expected-line-ending-format="LF"
[tool.pylint.EXCEPTIONS]
overgeneral-exceptions="builtin.Exception"
[tool.mypy]
ignore_missing_imports = true
follow_imports = "normal"
follow_imports_for_stubs = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
no_implicit_optional = true
warn_unused_ignores = true
warn_return_any = true
warn_unreachable = true
implicit_reexport = true
strict_equality = true