-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
199 lines (186 loc) · 3.83 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
[project]
name = "evo-featureflags-client"
dynamic = ["version"]
description = "Feature flags client"
readme = "README.md"
authors = [
{ name = "d.zakharchuk", email = "[email protected]" },
{ name = "m.kindritskiy", email = "[email protected]" },
{ name = "Vladimir Magamedov", email = "[email protected]" },
]
dependencies = [
"dataclass-wizard==v0.22.2",
]
requires-python = ">=3.9"
license = { text = "MIT" }
[project.optional-dependencies]
httpx = ["httpx~=0.24.1"]
aiohttp = ["aiohttp~=3.9.1"]
requests = ["requests~=2.31.0"]
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[tool.pdm]
[tool.pdm.version]
source = "file"
path = "featureflags_client/__init__.py"
[tool.pdm.scripts]
release = "./scripts/release.sh"
ishell = "ptpython --asyncio --dark-bg --history-file=.ptpython {args}"
test = "python -m pytest {args}"
docs = "sphinx-build -a -b html docs public"
ruff = "ruff check featureflags_client examples {args} --fix"
ruff-diff = "ruff check featureflags_client examples {args}"
mypy = "mypy featureflags_client {args}"
black = "black featureflags_client examples {args}"
fmt = { composite = ["black", "ruff"] }
[tool.pdm.dev-dependencies]
dev = [
"ptpython>=3.0.25",
]
test = [
"pytest~=7.1",
"pytest-asyncio~=0.18",
"faker==18.13",
"tox-pdm==0.7.0",
"protobuf<4.0.0",
"httpx>=0.24.1",
"aiohttp>=3.9.1",
"requests>=2.31.0",
]
lint = [
"black>=23.3.0",
"ruff>=0.1.0",
"mypy>=1.4.1",
"types-requests>=2.31.0.20240106",
]
docs = [
"sphinx==5.3.0",
"sphinx-rtd-theme==1.3.0",
"sphinxcontrib-asyncio==0.3.0",
]
examples = [
"aiohttp>=3.8.6",
"flask>=2.2.5",
"sanic>=23.3.0",
"httpx>=0.24.1",
"requests>=2.31.0",
]
[tool.pytest.ini_options]
addopts = "-p no:warnings -p no:cacheprovider -q --tb=native"
filterwarnings = [
"ignore::DeprecationWarning:google.*"
]
log_cli = true
testpaths = [
"featureflags_client/tests",
]
asyncio_mode = "auto"
[tool.black]
line-length = 80
target-version = ['py38']
extend-exclude = '''
/(
| .git
| __pycache__
| __pypackages__
| .venv
| venv
| .ve
)/
'''
[tool.ruff]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # Pyflakes
"C90", # McCabe
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
"ASYNC", # flake8-async
"S", # bandit
"DTZ", # flake8-datetimez
"A", # flake8-builtins
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"T20", # flake8-print
"SIM", # flake8-simplify
"ERA", # eradicate
"PL", # pylint
"RUF", # ruff-specific
]
ignore = [
"S101",
"S104",
"S105",
"DTZ003",
"DTZ006",
"A003",
"B008",
]
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
".venv",
"venv",
".ve",
"__pycache__",
]
line-length = 80
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
target-version = "py38"
[tool.ruff.per-file-ignores]
"featureflags_client/tests/*" = [
"A002",
"E501",
"S101",
"S105",
"S106",
"PLR2004",
"PLR0913",
"DTZ005",
"DTZ003",
"T201",
]
[tool.ruff.mccabe]
max-complexity = 10
[tool.ruff.isort]
known-first-party = ["featureflags_client"]
[tool.mypy]
python_version = "3.8"
follow_imports = "skip"
pretty = true
strict_optional = false
warn_no_return = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
ignore_missing_imports = true
exclude = [
".git",
"__pycache__",
"__pypackages__",
".venv",
"venv",
".ve",
"featureflags_client/tests",
]