-
Notifications
You must be signed in to change notification settings - Fork 21
/
pyproject.toml
161 lines (139 loc) · 4.35 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
[build-system]
requires = ["hatchling>=1.17.1", "hatch-vcs>=0.3.0"]
build-backend = "hatchling.build"
[project]
name = "fastapi_msal"
description = "FastAPI/MSAL - The MSAL (Microsoft Authentication Library) plugin for FastAPI!"
readme = "README.md"
license = "MIT"
requires-python = ">=3.9"
keywords = ["FastAPI", "MSAL", "SSO", "AAD", "authentication", "plugin", "fastapi-plugin", "fastapi-middleware"]
authors = [{ name = "Dudi Levy", email = "4785835+dudil@users.noreply.github.com" }]
classifiers = [
# How mature is this project? Common values are
# 3 - Alpha
# 4 - Beta
# 5 - Production/Stable
"Development Status :: 5 - Production/Stable",
# Indicate who your project is intended for
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Intended Audience :: System Administrators",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development",
"Typing :: Typed",
"Framework :: AsyncIO",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dynamic = ["version"]
dependencies = ["pydantic>=2.4", "pydantic_settings>=2.0", "starlette", "fastapi", "msal"]
[project.urls]
Homepage = "https://github.com/dudil/fastapi_msal"
Documentation = "https://github.com/dudil/fastapi_msal#readme"
Issues = "https://github.com/dudil/fastapi_msal/issues"
Source = "https://github.com/dudil/fastapi_msal"
[tool.hatch.version]
source = "vcs"
[tool.hatch.version.raw-options]
version_scheme = "python-simplified-semver"
local_scheme = "no-local-version"
git_describe_command = ["git", "describe", "--tags", "--long", "--match", "*"]
[tool.hatch.build.hooks.vcs]
version-file = "fastapi_msal/_version.py"
[tool.hatch.build.targets.sdist]
exclude = ["docs/", "/.venv/", "/.vscode/", "/.github/", "/.gitignore", "/.gitattributes", "/.git/", "/.idea/"]
[project.optional-dependencies]
full = ["python-multipart", "itsdangerous"]
dev = ["fastapi_msal[full]", "black", "ruff", "mypy", "pytest"]
[tool.hatch.envs.default]
path = ".venv"
dependencies = ["fastapi_msal[dev]"]
[tool.hatch.envs.default.scripts]
typing = "mypy --install-types --non-interactive {args:fastapi_msal}"
style = ["ruff check {args:.}", "black --check --diff {args:.}"]
fmt = ["black {args:.}", "ruff --fix {args:.}", "style"]
test = "pytest {args:tests}"
all = ["style", "typing"]
[tool.black]
line-length = 122
skip-string-normalization = true
[tool.ruff]
line-length = 122
[tool.ruff.lint]
select = [
"A",
"ARG",
"B",
"C",
"DTZ",
"E",
"EM",
"F",
"FBT",
"I",
"ICN",
"ISC",
"N",
"PLC",
"PLE",
"PLR",
"PLW",
"Q",
"RUF",
"S",
"T",
"TID",
"UP",
"W",
"YTT",
]
ignore = [
# Allow non-abstract empty methods in abstract base classes
# "B027",
# Allow boolean positional values in function calls, like `dict.get(... True)`
# "FBT003",
# Ignore checks for possible passwords
# "S105", "S106", "S107",
# Ignore complexity
"PLR0913",
# "C901", "PLR0912", "PLR0911", "PLR0915",
# Ignore print in code
"T201",
# Ignore prefer absolute imports over relative imports
"TID252",
# Ignore due to possible conflicts when used with the formatter
"ISC001",
]
unfixable = [
# Don't touch unused imports
"F401",
]
# ignore-init-module-imports = true
[tool.ruff.lint.per-file-ignores]
# avoid warnings related to __init__.py files imports
"__init__.py" = ["PLC0414"]
# Tests can use magic values, assertions, and relative imports
"tests/**/*" = ["PLR2004", "S101", "TID252"]
[tool.ruff.lint.isort]
known-first-party = ["fastapi_msal"]
[tool.mypy]
plugins = ["pydantic.mypy"]
follow_imports = "silent"
warn_redundant_casts = true
warn_unused_ignores = true
disallow_any_generics = true
check_untyped_defs = true
no_implicit_reexport = true
ignore_missing_imports = true
strict = true
disallow_untyped_defs = true
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
warn_untyped_fields = true