forked from pyca/pynacl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
125 lines (107 loc) · 3.38 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
[build-system]
# Must be kept in sync with `dependencies` below
requires = [
"setuptools>=61.0.0,!=74.0.0",
"wheel",
"cffi>=1.4.1; platform_python_implementation != 'PyPy'",
]
build-backend = "setuptools.build_meta"
[project]
dynamic = ["readme"]
name = "PyNaCl"
# Must be kept in sync with `src/nacl/__init__.py`
version = "1.6.0.dev1"
authors = [
{name = "The PyNaCl developers", email = "cryptography-dev@python.org"}
]
description = "Python binding to the Networking and Cryptography (NaCl) library"
license = {text = "Apache-2.0"}
classifiers = [
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"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",
"Programming Language :: Python :: 3.13",
]
requires-python = ">=3.7"
dependencies = [
"cffi>=1.4.1; platform_python_implementation != 'PyPy'"
]
[project.optional-dependencies]
tests = [
"pytest>=3.2.1,!=3.3.0",
"hypothesis>=3.27.0",
]
docs = [
"sphinx<7",
"sphinx_rtd_theme"
]
[project.urls]
"Homepage" = "https://github.com/pyca/pynacl"
"Bug Tracker" = "https://github.com/pyca/pynacl/issues"
"Documentation" = "https://pynacl.readthedocs.io"
[tool.black]
line-length = 79
target-version = ["py36"]
[tool.mypy]
show_error_codes = true
warn_redundant_casts = true
warn_incomplete_stub = true
disallow_any_unimported = true
disallow_any_expr = true # overridden to `false` inside `nacl.bindings`
disallow_any_decorated = true
disallow_any_explicit = true
disallow_any_generics = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
warn_unused_ignores = true
warn_no_return = true
warn_return_any = true # overridden to `false` inside `nacl.bindings`
warn_unreachable = true
no_implicit_reexport = true
strict_equality = true
files = [
"src/nacl",
"tests",
]
[[tool.mypy.overrides]]
module = [
"nacl._sodium",
]
ignore_missing_imports = true
# Within `nacl.bindings`, all of the C functions exposed via cffi in
# nacl._sodium return `Any` as far as mypy is concerned. It's not worth it to
# stub the C functions or cast() their uses. But this means there are more
# `Any`s floating around. So the more restrictive any checks we'd like to use
# should only be turned on outside of `bindings`.
[[tool.mypy.overrides]]
module = [
"nacl.bindings.*",
]
disallow_any_expr = false
warn_return_any = false
# Loosen some of the checks within the tests. Note that `tests.utils` passes with the
# strict checks on, but it's included here in the list of modules with looser checks
# to keep mypy's config simple(r).
[[tool.mypy.overrides]]
module = [
"tests.*",
]
# Some library helpers types' involve `Any`, in particular `pytest.mark.parameterize`
# and `hypothesis.strategies.sampledfrom`.
disallow_any_expr = false
disallow_any_decorated = false
# It's not useful to annotate each test function as `-> None`.
disallow_untyped_defs = false
disallow_incomplete_defs = false