-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
133 lines (109 loc) · 3.7 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
version = "0.1.0"
name = "mailchimp_api"
dependencies = [
"fastagency[autogen,mesop,server,fastapi,basic_auth]>=0.3.0",
"python-multipart>=0.0.17",
"pandas>=2.2.3",
"tenacity>=9.0.0",
]
[project.optional-dependencies]
testing = [
"pytest==8.3.3",
"pytest-asyncio==0.24.0",
]
# dev dependencies
lint = [
"types-PyYAML",
"types-setuptools",
"types-ujson",
"types-Pygments",
"types-docutils",
"mypy==1.13.0",
"ruff==0.7.4",
"pyupgrade-directories==0.3.0",
"bandit==1.7.10",
"semgrep==1.97.0",
"codespell==2.3.0",
"pytest-mypy-plugins==3.1.2",
]
dev = [
"mailchimp_api[testing,lint]",
"pre-commit==4.0.1",
"detect-secrets==1.5.0",
]
[tool.hatch.build.targets.wheel]
only-include = ["mailchimp_api"]
[tool.pytest.ini_options]
filterwarnings =["ignore::DeprecationWarning"]
asyncio_default_fixture_loop_scope = "function"
testpaths = [
"tests",
]
[tool.mypy]
files = ["mailchimp_api", "tests"]
strict = true
python_version = "3.11"
ignore_missing_imports = true
install_types = true
non_interactive = true
plugins = [
"pydantic.mypy",
]
# from https://blog.wolt.com/engineering/2021/09/30/professional-grade-mypy-configuration/
disallow_untyped_defs = true
no_implicit_optional = true
check_untyped_defs = true
warn_return_any = true
show_error_codes = true
warn_unused_ignores = false
disallow_incomplete_defs = true
disallow_untyped_decorators = true
disallow_any_unimported = false
[tool.ruff]
fix = true
line-length = 88
include = ["mailchimp_api/**/*.py", "mailchimp_api/**/*.pyi", "pyproject.toml"]
exclude = []
[tool.ruff.lint]
select = [
"E", # pycodestyle errors https://docs.astral.sh/ruff/rules/#error-e
"W", # pycodestyle warnings https://docs.astral.sh/ruff/rules/#warning-w
"C90", # mccabe https://docs.astral.sh/ruff/rules/#mccabe-c90
"N", # pep8-naming https://docs.astral.sh/ruff/rules/#pep8-naming-n
"D", # pydocstyle https://docs.astral.sh/ruff/rules/#pydocstyle-d
"I", # isort https://docs.astral.sh/ruff/rules/#isort-i
"F", # pyflakes https://docs.astral.sh/ruff/rules/#pyflakes-f
"ASYNC", # flake8-async https://docs.astral.sh/ruff/rules/#flake8-async-async
"C4", # flake8-comprehensions https://docs.astral.sh/ruff/rules/#flake8-comprehensions-c4
"B", # flake8-bugbear https://docs.astral.sh/ruff/rules/#flake8-bugbear-b
"Q", # flake8-quotes https://docs.astral.sh/ruff/rules/#flake8-quotes-q
"T20", # flake8-print https://docs.astral.sh/ruff/rules/#flake8-print-t20
"SIM", # flake8-simplify https://docs.astral.sh/ruff/rules/#flake8-simplify-sim
"PT", # flake8-pytest-style https://docs.astral.sh/ruff/rules/#flake8-pytest-style-pt
"PTH", # flake8-use-pathlib https://docs.astral.sh/ruff/rules/#flake8-use-pathlib-pth
"TCH", # flake8-type-checking https://docs.astral.sh/ruff/rules/#flake8-type-checking-tch
"RUF", # Ruff-specific rules https://docs.astral.sh/ruff/rules/#ruff-specific-rules-ruf
"PERF", # Perflint https://docs.astral.sh/ruff/rules/#perflint-perf
]
ignore = [
"E501", # line too long, handled by formatter later
"D100", "D101", "D102", "D103", "D104",
# "C901", # too complex
]
[tool.ruff.lint.isort]
case-sensitive = true
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.flake8-bugbear]
[tool.bandit]
[tool.black]
line-length = 88
[tool.codespell]
skip = "./venv*"
ignore-words = ".codespell-whitelist.txt"