-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
121 lines (112 loc) · 3.95 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
[tool.poetry]
name = "fastapi_version_handler"
version = "0.1.0"
description = "FastAPI Version Handler: Efficient Header-Based Routing for API Versioning in FastAPI"
authors = ["Vladimir Mitrovic <[email protected]>"]
repository = "https://github.com/devla/fastapi_version_handler.git"
readme = "README.md"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Framework :: FastAPI",
"Typing :: Typed",
"Environment :: Web Environment",
"Topic :: Software Development :: Libraries :: Python Modules",
# Add any additional classifiers here
]
[tool.poetry.dependencies]
python = "^3.10"
fastapi = "^0.110.2"
jinja2 = "^3.1.3"
[tool.poetry.group.dev.dependencies]
pytest = "^8.2.0"
pytest-asyncio = "^0.23.6"
httpx = "^0.27.0"
uvicorn = "^0.29.0"
black = "^24.4.2"
ruff = "^0.4.2"
better-devtools = "^0.13.3"
pdbpp = "^0.10.3"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.pytest.ini_options]
asyncio_mode = "auto"
[tool.black]
line-length = 120
target-version = ["py310"]
[tool.ruff]
line-length = 120
lint.select = [
"F", # pyflakes
"E", # pycodestyle errors
"W", # pycodestyle warnings
"C90", # mccabe
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
"YTT", # flake8-2020
"S", # flake8-bandit
"BLE", # flake8-blind-except
"FBT003", # flake8-boolean-trap
"B", # flake8-bugbear
"A", # flake8-builtins
"COM", # flake8-commas
"C4", # flake8-comprehensions
"T10", # flake8-debugger
"ISC", # flake8-implicit-str-concat
"G010", # Logging statement uses warn instead of warning
"G201", # Logging .exception(...) should be used instead of .error(..., exc_info=True)
"G202", # Logging statement has redundant exc_info
"INP", # flake8-no-pep420
"PIE", # flake8-pie
"T20", # flake8-print
"PYI", # flake8-pyi
"PT", # flake8-pytest-style
"Q", # flake8-quotes
"RSE", # flake8-raise
"RET", # flake8-return
"SIM", # flake8-simplify
"TCH", # flake8-type-checking
"ARG", # flake8-unused-arguments
"PTH", # flake8-use-pathlib
"TD", # flake8-todos
"ERA", # flake8-eradicate
"PGH", # pygrep-hooks
"PLC0414", # Import alias does not rename original package
"PLE", # Error
"PLW", # Warning
"TRY", # tryceratops
"FLY", # flynt
"RUF", # ruff-specific rules
"ANN001", # missing type annotation for arguments
"ANN002", # missing type annotation for *args
"ANN003", # missing type annotation for **kwargs
]
lint.unfixable = [
"ERA001" # eradicate: found commented out code can be dangerous if fixed automatically
]
lint.ignore = [
"A002", # builtin shadowing in arguments
"A003", # builtin shadowing in attributes
"D203", # 1 blank line required before class docstring
"TD002", # Missing author in TODO; try: `# TODO(<author_name>): ...`
"ARG002", # Unused method argument
"TRY003", # Avoid specifying long messages outside the exception class
"TRY300", # Consider moving statement into the else clause
"ARG001", # Unused first argument
"ARG005", # Unused lambda argument
"PT019", # Fixture without value is injected as parameter, use @pytest.mark.usefixtures instead
"SIM108" # Use ternary operator instead of if-else block (ternaries lie to coverage)
]
extend-exclude = ["migrations"]
[tool.ruff.lint.per-file-ignores]
"tests/*" = [
"S", # ignore bandit security issues in tests
"B018", # ignore assert in tests
"PT012", # ignore complex with pytest.raises clauses
]