-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathpyproject.toml
159 lines (145 loc) · 3.45 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
158
159
[build-system]
requires = ["flit_core >=3.2,<4"]
build-backend = "flit_core.buildapi"
[project]
name = "pynitrokey"
authors = [
{ name = "Nitrokey", email = "pypi@nitrokey.com" },
]
readme = "README.md"
requires-python = ">=3.9"
classifiers = [
"License :: OSI Approved :: MIT License",
"License :: OSI Approved :: Apache Software License",
"Intended Audience :: Developers",
"Intended Audience :: End Users/Desktop",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
dependencies = [
"certifi >= 14.5.14",
"cffi",
"click >=8.0, <=8.1.3",
"cryptography >=41.0.4,<44",
"ecdsa",
"fido2 >=1.1.2,<2",
"intelhex",
"nkdfu",
"python-dateutil ~= 2.7.0",
"pyusb",
"requests",
"spsdk >=2.0,<2.1",
"tqdm",
"tlv8",
"typing_extensions ~= 4.3.0",
"pyserial",
"protobuf >=3.17.3, < 4.0.0",
"click-aliases",
"semver",
"nethsm >= 1.0.0,<2",
]
dynamic = ["version", "description"]
[project.optional-dependencies]
dev = [
"black >=22.1.0,<23",
"flake8",
"flit >=3.2,<4",
"ipython",
"isort",
"mypy >=1.4,<1.5",
"pyinstaller ==5.9.0",
"pyinstaller-versionfile ==2.1.1; sys_platform=='win32'",
"types-requests",
"types-tqdm",
"pytest",
"pytest-reporter-html1",
"oath"
]
pcsc = ["pyscard >=2.0.0,<3"]
[project.urls]
Source = "https://github.com/Nitrokey/pynitrokey"
[project.scripts]
nitropy = "pynitrokey.cli:main"
[tool.black]
target-version = ["py39"]
[tool.isort]
py_version = "39"
profile = "black"
[tool.mypy]
mypy_path = "stubs"
show_error_codes = true
python_version = "3.9"
strict = true
# disable strict checks for old code, see
# - https://github.com/python/mypy/issues/11401
# - https://mypy.readthedocs.io/en/stable/existing_code.html#introduce-stricter-options
[[tool.mypy.overrides]]
module = [
"pynitrokey.cli",
"pynitrokey.cli.pro",
"pynitrokey.cli.program",
"pynitrokey.cli.start",
"pynitrokey.cli.storage",
"pynitrokey.cli.update",
"pynitrokey.conftest",
"pynitrokey.libnk",
"pynitrokey.start.*",
"pynitrokey.test_secrets_app",
]
check_untyped_defs = false
disallow_any_generics = false
disallow_incomplete_defs = false
disallow_subclassing_any = false
disallow_untyped_calls = false
disallow_untyped_decorators = false
disallow_untyped_defs = false
no_implicit_reexport = false
strict_concatenate = false
strict_equality = false
warn_unused_ignores = false
warn_return_any = false
# pynitrokey.nk3.bootloader.nrf52_upload is only temporary in this package
[[tool.mypy.overrides]]
module = "pynitrokey.trussed.bootloader.nrf52_upload.*"
ignore_errors = true
# nrf52 has to use the untyped nrf52_upload module
[[tool.mypy.overrides]]
module = "pynitrokey.trussed.bootloader.nrf52"
disallow_untyped_calls = false
# libraries without annotations
[[tool.mypy.overrides]]
module = [
"cbor.*",
"cffi.*",
"click.*",
"ecdsa.*",
"intelhex.*",
"nacl.*",
"nkdfu.*",
"ruamel.*",
"serial.*",
"usb.*",
"usb1.*",
"tlv8.*",
"pytest.*",
"click_aliases.*",
]
ignore_missing_imports = true
[tool.pytest.ini_options]
log_cli = false
log_cli_level = "INFO"
log_cli_format = "%(asctime)s [%(levelname)3s] %(message)s"
log_cli_date_format = "%H:%M:%S"
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
]
[tool.ruff]
line-length = 120
exclude = [
"venv",
"start",
"nk3",
]
target-version = "py39"