-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
184 lines (165 loc) · 4.78 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
[project]
name = "deps-injection" # SHOULD BE SAME WITH PROJECT NAME IN PYPI PUBLISHER
requires-python = ">=3.8"
license = { text = "MIT" }
dynamic = ["version"]
authors = [
{ name = "Ivan Belyaev", email = "[email protected]" },
]
classifiers = [
"Programming Language :: Python",
"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 :: Implementation :: CPython"
]
keywords = ["dependency", "injector", "di", "injection"]
description = "Easy dependency injection without wiring"
dependencies = [
"typing-extensions>=4.12.2",
]
readme = "README.md"
[project.urls]
Homepage = "https://pypi.org/project/deps-injection/"
Issues = "https://github.com/nightblure/injection/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc"
Changelog = "https://github.com/nightblure/injection/releases"
Documentation = "https://injection.readthedocs.io/latest/"
Repository = "https://github.com/nightblure/injection.git"
[tool.ruff]
line-length = 88
extend-exclude = ["docs", ".venv"]
[tool.ruff.format]
quote-style = "double"
[tool.ruff.lint]
select = [
# RULES: https://docs.astral.sh/ruff/rules/
"A", # flake8-builtins
"B", # flake8-bugbear
"C", # flake8-comprehensions
"E", # pycodestyle errors
"G", # flake8-logging-format
"F", # pyflakes
"I", # isort
"N", # PEP8 naming
"S", # flake8-bandit
"W", # pycodestyle warnings
"T20", # flake8-print
"C4", # flake8-comprehensions
"EM", # flake8-errmsg
"UP", # pyupgrade
"PL", # Pylint
"PT", # flake8-pytest-style
"ISC", # flake8-implicit-str-concat
"ICN", # flake8-import-conventions
"ARG", # flake8-unused-arguments
"COM", # flake8-commas
"FBT", # flake8-boolean-trap
"LOG", # flake8-logging
"SIM", # flake8-simplify
"TRY", # tryceratops
"PIE", # flake8-pie
"RUF", # Ruff-specific rules
"ASYNC", # flake8-async
]
ignore = [
"D103", # Missing docstring in public function
"PLR2004", # Magic value used in comparison, consider replacing X with a constant variable
"SIM108", # Use ternary operator
"SIM117", # Use a single `with` statement with multiple contexts instead of nested `with` statements
"E501", # Line too long
"TRY002", # Create your own exception
]
[tool.ruff.lint.extend-per-file-ignores]
"tests/test_integrations/**.py" = ["ANN001", "ANN201"]
"tests/**.py" = ["S101", "PLR2004", "PT011", "C409", "B017"]
"tests/test_integrations/test_drf/**.py" = ["E501", "S105", "EM101", "TRY003"]
"tests/container_objects.py" = ["PLR0913", "ARG001"]
"src/injection/__init__.py" = ["F401"]
"docs/conf.py" = ["A001"]
[tool.pytest.ini_options]
pythonpath = ["src"]
asyncio_mode = "auto"
filterwarnings = [
"ignore::DeprecationWarning:pkg_resources.*",
]
[tool.hatch.version]
path = "src/injection/__version__.py"
[tool.hatch.build.targets.sdist]
only-include = ["src/injection"]
[tool.hatch.build.targets.wheel]
packages = ["src/injection"]
[tool.pdm]
distribution = false
[tool.pdm.dev-dependencies]
dev = [
"hatch==1.13.0",
"pre-commit",
"mypy>=1.13.0",
"setuptools>=75.2.0",
]
docs = [
"sphinx==7.*",
"sphinx-rtd-theme==2.*",
"sphinx-autobuild",
"sphinx-copybutton==0.*",
"myst-parser==3.*",
]
test = [
"pytest",
"pytest-asyncio",
"pytest-cov",
"djangorestframework",
"fastapi",
"litestar",
"flask",
]
[tool.hatch.envs.hatch-test]
extra-dependencies = [
"typing-extensions>=4.12.2",
"pytest-asyncio",
"pytest-cov",
"djangorestframework",
"fastapi",
"litestar",
"flask",
]
# https://hatch.pypa.io/1.13/config/internal/testing/#scripts
[tool.hatch.envs.hatch-test.scripts]
run = "pytest{env:HATCH_TEST_ARGS:} {args}"
run-cov = "coverage run -m pytest{env:HATCH_TEST_ARGS:} {args}"
cov-combine = "coverage combine"
cov-report = [
"coverage xml",
"coverage report -m"
]
[[tool.hatch.envs.hatch-test.matrix]]
python = ["3.8", "3.9", "3.10", "3.11", "3.12"]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
# https://hatch.pypa.io/latest/plugins/publisher/package-index/
# https://hatch.pypa.io/latest/how-to/publish/repo/
#[tool.hatch.publish.index.repos.main]
#url = "https://upload.pypi.org/legacy/"
#
#[tool.hatch.publish.index.repos.test]
#url = "https://test.pypi.org/legacy/"
[tool.coverage.run]
omit = [
"src/injection/__version__.py",
"*/tests/*"
]
[tool.coverage.report]
exclude_lines = [
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"sys.version_info",
"raise NotImplementedError",
"ImportError"
]
[tool.mypy]
python_version = "3.8" # oldest supported version at this moment
strict = true
ignore_missing_imports = true