-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathpyproject.toml
157 lines (138 loc) · 4.4 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
154
155
156
157
[tool.poetry]
name = "pyzkaccess"
version = "1.1"
description = "Library and CLI tool for working with ZKTeco ZKAccess C3-100/200/400 controllers"
license = "Apache-2.0"
authors = ["Igor Derkach <[email protected]>"]
readme = "README.md"
homepage = "https://github.com/bdragon300/pyzkaccess"
repository = "https://github.com/bdragon300/pyzkaccess"
documentation = "https://bdragon300.github.io/pyzkaccess/"
keywords = ["zkaccess", "zkteco", "c3-100", "c3-200", "c3-400", "access control", "door controller", "zkaccess control"]
classifiers = [
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Operating System :: Microsoft :: Windows",
"Development Status :: 4 - Beta",
"License :: OSI Approved :: Apache Software License",
"Intended Audience :: Developers",
"Intended Audience :: Telecommunications Industry",
"Intended Audience :: Customer Service",
"Topic :: System :: Hardware"
]
packages = [{include = "pyzkaccess"}]
[tool.poetry.scripts]
pyzkaccess = "pyzkaccess.cli:main"
[tool.poetry.dependencies]
python = "^3.8"
wrapt = "^1.16.0"
fire = "^0.7.0"
prettytable = "^3.11.0"
[tool.poetry.group.dev.dependencies]
pytest = "~8"
pytest-clarity = "~1"
pytest-cov = "~5"
pre-commit = "~3"
pdoc3 = "~0"
setuptools = "~75"
black = "~24"
isort = "~5"
mypy = "~1"
pylint = "~3"
pytest-mock = "^3.14.0"
flake8 = "~5"
flake8-pyproject = "~1"
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "--cov=pyzkaccess --cov-report xml --cov-config=pyproject.toml"
pythonpath = ["pyzkaccess"]
[tool.coverage.run]
omit = ["pyzkaccess/cli.py"]
# Linters options
[tool.black]
line-length = 120
[tool.isort]
line_length = 120
multi_line_output = 3
force_grid_wrap = 0
use_parentheses = true
ensure_newline_before_comments = true
include_trailing_comma = true
[tool.mypy]
python_version = "3.8"
platform = "win32"
incremental = true
strict = true
warn_return_any = false
ignore_missing_imports = true
disallow_untyped_decorators = false
disallow_subclassing_any = false
disallow_any_generics=false
warn_unreachable = true
show_error_context = true
exclude = ['pyzkaccess/cli.py'] # cli.py will not pass the checks, since it has been written specially for Fire library
[[tool.mypy.overrides]]
module = "tests.*"
ignore_errors = true
[tool.pylint.main]
py-version = 3.8
# cli.py will not pass the checks, since it has been written specially for Fire library
ignore-paths = ["tests", 'pyzkaccess/cli.py']
recursive = true # https://stackoverflow.com/questions/48024049/pylint-raises-error-if-directory-doesnt-contain-init-py-file
load-plugins = [
"pylint.extensions.bad_builtin",
"pylint.extensions.check_elif",
"pylint.extensions.broad_try_clause",
"pylint.extensions.dict_init_mutate",
"pylint.extensions.docstyle",
"pylint.extensions.private_import",
"pylint.extensions.redefined_variable_type",
"pylint.extensions.overlapping_exceptions",
"pylint.extensions.docparams",
"pylint.extensions.redefined_loop_name",
"pylint.extensions.typing"
]
disable = [
"import-error",
"no-name-in-module",
"missing-module-docstring",
"missing-class-docstring",
"missing-function-docstring",
"too-few-public-methods",
"fixme",
"too-many-return-statements",
"too-many-try-statements",
"logging-too-many-args", # Pylint doesn't recognize logger.info("%s", param)
"invalid-metaclass"
]
enable = ['c-extension-no-member']
reports = false
output-format = 'parseable'
[tool.pylint.basic]
include-naming-hint = true
class-const-naming-style = "any"
# Allow the numbers in TypeVar names
typevar-rgx = "^_{0,2}(?!T[A-Z])(?:[A-Z]+|(?:[A-Z]+[a-z0-9]+)+T?(?<!Type))(?:_co(?:ntra)?)?$"
[tool.pylint.broad_try_clause]
max-try-statements = 10
[tool.pylint.parameter_documentation]
default-docstring-type = "google"
[tool.pylint.variables]
contextmanager-decorators = ['contextlib.contextmanager', 'contextlib.asynccontextmanager']
ignored-modules = 'asyncio'
callbacks = ['cb_', '_cb', '_callback']
[tool.pylint.format]
max-line-length=120
[tool.pylint.design]
max-attributes=10
max-args=10
[tool.pylint.similarities]
min-similarity-lines=20
[tool.pylint.typecheck]
contextmanager-decorators = ["contextlib.contextmanager", "contextlib.asynccontextmanager"]
[tool.flake8]
max-line-length = 120
exclude = [".git", "__pycache__"]