-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
113 lines (101 loc) · 3.54 KB
/
Copy pathpyproject.toml
File metadata and controls
113 lines (101 loc) · 3.54 KB
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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "django-autowired"
version = "0.4.0"
description = "Spring Boot-style @injectable autowiring for Python — zero manual wiring, any DI backend."
readme = "README.md"
license = {text = "MIT"}
requires-python = ">=3.12"
authors = [
{ name = "Tyler R. Suehr", email = "tyler@vitablehealth.com" },
]
classifiers = [
"Development Status :: 3 - Alpha",
"Framework :: Django",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Framework :: Django :: 5.1",
"Framework :: FastAPI",
"Framework :: Flask",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
keywords = ["dependency-injection", "autowiring", "django", "fastapi", "flask", "injector"]
dependencies = []
[project.optional-dependencies]
injector = ["injector>=0.21"]
lagom = ["lagom>=2.6"]
wireup = ["wireup>=0.14"]
dishka = ["dishka>=0.14"]
django = ["Django>=4.2"]
fastapi = ["fastapi>=0.110", "anyio>=4.0"]
flask = ["Flask>=3.0"]
testing = ["pytest>=8.0", "pytest-asyncio>=0.23"]
dev = [
"django-autowired[injector,lagom,wireup,dishka,django,fastapi,flask,testing]",
"pytest>=8.0",
"pytest-asyncio>=0.23",
"pytest-cov>=5.0",
"mypy>=1.9",
"ruff>=0.4",
"mkdocs>=1.5",
"mkdocs-material>=9.6,<9.7",
"mkdocstrings[python]>=0.24",
]
[project.urls]
Homepage = "https://github.com/tylersuehr7/django-autowired"
Documentation = "https://tylersuehr7.github.io/django-autowired"
Repository = "https://github.com/tylersuehr7/django-autowired"
Issues = "https://github.com/tylersuehr7/django-autowired/issues"
Changelog = "https://github.com/tylersuehr7/django-autowired/blob/main/CHANGELOG.md"
[tool.hatch.build.targets.wheel]
packages = ["src/django_autowired"]
[tool.pytest.ini_options]
testpaths = ["tests"]
markers = [
"autowired_packages: packages to scan for the autowired_container fixture",
"autowired_backend: backend name for the autowired_container fixture",
]
asyncio_mode = "auto"
[tool.mypy]
python_version = "3.12"
warn_unused_configs = true
mypy_path = "src"
check_untyped_defs = true
disallow_untyped_defs = false
warn_redundant_casts = true
warn_unused_ignores = true
no_implicit_optional = true
strict_equality = true
[[tool.mypy.overrides]]
# Third-party DI libraries without complete type stubs.
module = ["lagom", "lagom.*", "wireup", "wireup.*", "dishka", "dishka.*", "injector"]
ignore_missing_imports = true
[[tool.mypy.overrides]]
# Django's apps module lacks py.typed in older releases.
module = ["django.apps"]
ignore_missing_imports = true
[tool.ruff]
src = ["src", "tests"]
line-length = 99
[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B", "SIM"]
# UP046/UP047 push PEP 695 generic syntax — we use TypeVar for readability.
# B010 flags `setattr` for known attrs, but we need it to bypass mypy's
# method-assign warning on dynamic @inject application.
ignore = ["UP046", "UP047", "B010"]
[tool.ruff.lint.per-file-ignores]
# Tests use pytest.importorskip before imports, FastAPI Depends() in defaults, and unused test fixtures.
"tests/**/*.py" = ["E402", "F401", "F811", "B008"]
# Demo apps use the same fixture/Depends patterns as the test suite.
"examples/**/*.py" = ["E402", "F401", "F811", "B008"]
[tool.coverage.run]
source = ["src/django_autowired"]