-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
203 lines (175 loc) · 5.72 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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
[tool.poetry]
name = "django-allianceutils"
version = "4.1.0"
description = "Alliance Software common utilities for Django"
repository = "https://github.com/AllianceSoftware/django-allianceutils/"
homepage = "https://github.com/AllianceSoftware/django-allianceutils/"
documentation = "https://github.com/AllianceSoftware/django-allianceutils/blob/master/README.md"
authors = ["Alliance Software <[email protected]>"]
license = "BSD-2-Clause"
readme = "README.md"
packages = [
{ include = "allianceutils", from = "src" },
]
include = [
"CHANGELOG.md",
"LICENSE",
"src/allianceutils/py.typed",
]
keywords = [
"django",
'alliance',
'alliancesoftware',
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Framework :: Django",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Intended Audience :: Developers",
"Operating System :: MacOS",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Typing :: Typed",
]
[tool.poetry.urls]
issues = "https://github.com/AllianceSoftware/django-allianceutils/issues"
[tool.poetry.dependencies]
# you need the <4.0 for cachetools which is a tox dependency
python = ">=3.8,<4.0"
# the only hard dependency is django; everything else is only required
# if you use functions/classes that require them
#
# IMPORTANT
# We test multiple django versions, so these appear under `deps` in tox.ini
# and aren't listed here at all. Other deps are installed from the poetry
# lockfile based on what is listed here.
# It's not possible to natively get poetry to use a different version for dev
# via groups or extras because it only resolves dependencies once (globally)
# see https://github.com/python-poetry/poetry/issues/6611
typing_extensions = "^4.5.0"
# optional extras
isort = { version = ">=5", optional = true }
logging_tree = { version = "*", optional = true }
rules = { version = "*", optional = true }
# optional databases
mysqlclient = { version = "*", optional = true }
psycopg2 = { version = "*", optional = true }
[tool.poetry.extras]
extras = [
"isort",
"logging_tree",
"rules",
]
mysql = ["mysqlclient"]
postgres = ["psycopg2"]
[tool.poetry.group.databases.dependencies]
mysqlclient = "*"
psycopg2 = "*"
[tool.poetry.group.dev]
optional = true
[tool.poetry.group.dev.dependencies]
isort = ">=5"
tox = ">=4"
tox-poetry-installer = {extras = ["poetry"], version = "^1.0.0b1", allow-prereleases = true}
mypy = ">=1.3"
django-filter-stubs = "*"
django-stubs = "*"
djangorestframework-stubs = "*"
types-mysqlclient = "*"
types-psycopg2 = "*"
types-Werkzeug = "*"
# ===================================================================================================================
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
# ===================================================================================================================
[tool.isort]
force_single_line = true
force_sort_within_sections = true
line_length = 110
order_by_type = false
skip_glob = [
"*/.tox/*",
"*/node_modules/*.py",
"*/migrations/0*.py",
"*/settings/*.py",
]
# stdlib that may be backported or not always there
extra_standard_library=[
"pkg_resources",
"setuptools",
"typing",
]
# packages that we may have made local modifications to or are checked out from github
# IsortTestCase has expectations about what is set here:
known_third_party=["test_allianceutils.tests.isort_force_thirdparty"]
#known_first_party=["allianceutils"]
# ===================================================================================================================
[tool.mypy]
python_version = "3.8"
plugins = [
"mypy_django_plugin.main",
"mypy_drf_plugin.main",
]
#exclude = ['/migrations/', 'bin/', 'venv/', '/tests/']
# mypy_path is needed because mypy won't look for config in ancestor dirs:
# https://github.com/python/mypy/issues/3377#issuecomment-302308046
mypy_path = '$MYPY_CONFIG_FILE_DIR/src'
# default files to check if none given on command line
files = '$MYPY_CONFIG_FILE_DIR/src/**/*.py'
allow_redefinition = false
allow_untyped_globals = false
# ignore_missing_imports tells mypy to just not check 3rd party missing stubs
# module = ["pghistory", "docutils", "PyPDF2", "OpenSSL", "pyppetter", "pgtrigger", "..."]
# is one workaround but it will fail whenever a new module gets enabled here. yikes.
#ignore_missing_imports = true
#module = [
# "rules",
#]
ignore_missing_imports = false
check_untyped_defs = true
# disallow_any_unimported = true
# disallow_incomplete_defs = true
disallow_untyped_calls = false
disallow_untyped_decorators = true
# disallow_untyped_defs = true # if you adopt this then will want to do it on a module-by-module basis
ignore_errors = false
implicit_optional = false
implicit_reexport = false
local_partial_types = true
show_error_codes = true
strict_optional = true
strict_equality = true
no_implicit_optional = true
warn_redundant_casts = true
# warn_return_any = true
warn_unused_configs = true
warn_unused_ignores = true
warn_unreachable = true
warn_no_return = true
#[tool.mypy-isort.*]
#module = [
# "isort.*",
# "rules",
#]
#ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "isort"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "isort.api"
no_implicit_reexport = false
[[tool.mypy.overrides]]
module = "logging_tree"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "rules"
ignore_missing_imports = true
[tool.django-stubs]
django_settings_module = "test_allianceutils.settings"