-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
139 lines (127 loc) · 3.41 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
[tool.poetry]
name = "cloudrunproject"
version = "0.1.0"
description = ""
authors = ["Sergey Yarlov <[email protected]>"]
readme = "README.md"
package-mode = false
[tool.poetry.dependencies]
python = "^3.12"
fastapi = "^0.112.2"
uvicorn = "^0.30.6"
[tool.poetry.group.dev.dependencies]
pre-commit = "^3.8.0"
autoflake = "^2.3.1"
isort = "^5.13.2"
black = "^24.8.0"
flake8 = "^7.1.1"
pyupgrade = "^3.17.0"
flake8-pyproject = "^1.2.3"
pytest = "^8.3.2"
pytest-deadfixtures = "^2.2.1"
mypy = "^1.11.2"
httpx = "^0.27.2"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.black]
# https://github.com/psf/black
target-version = ["py312"]
line-length = 120
color = true
exclude = '''
/(
\.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
| env
| venv
| .venv
)/
'''
[tool.isort]
# https://github.com/timothycrosley/isort/
py_version = 312
known_typing = ["typing", "types", "typing_extensions", "mypy", "mypy_extensions"]
sections = ["FUTURE", "TYPING", "STDLIB", "THIRDPARTY", "FIRSTPARTY", "MAIN", "LOCALFOLDER"]
default_section = "FIRSTPARTY"
known_main = ["service"]
skip = ["__init__.py"]
include_trailing_comma = true
profile = "black"
multi_line_output = 3
indent = 4
color_output = true
[tool.autoflake]
# return error code if changes are needed
check = false
# make changes to files instead of printing diffs
in-place = true
# drill down directories recursively
recursive = true
# exclude file/directory names that match these comma-separated globs
exclude = ".venv,venv"
# by default, only unused standard library imports are removed; specify a comma-separated list of additional
# modules/packages
#imports = "<IMPORTS>"
# expand wildcard star imports with undefined names; this only triggers if there is only one star import in
# the file; this is skipped if there are any uses of `__all__` or `del` in the file
expand-star-imports = false
# remove all unused imports (not just those from the standard library)
remove-all-unused-imports = true
# exclude __init__.py when removing unused imports
ignore-init-module-imports = true
# remove all duplicate keys in objects
remove-duplicate-keys = true
# remove unused variables
remove-unused-variables = false
# ignore all pass statements
ignore-pass-statements = false
# ignore pass statements after a newline ending on '"""'
ignore-pass-after-docstring = true
[tool.flake8]
max-complexity = 6
statistics = true
max-line-length = 120
doctests = true
ignore = ["N999", "D100", "D104", "D106", "D401", "N999", "W503", "W504", "Q003", "B902", "P101", "P103", "N818",
"E203", "E731", "B017", "SIM114",
]
no-accept-encodings = true
# exclude = []
# Flake plugins:
accept-encodings = "utf-8"
[tool.mypy]
# https://mypy.readthedocs.io/en/latest/config_file.html#using-a-pyproject-toml-file
python_version = 3.12
pretty = true
show_traceback = true
color_output = true
plugins = [
"pydantic.mypy"
]
allow_redefinition = false
check_untyped_defs = true
disallow_any_generics = true
disallow_incomplete_defs = true
disallow_untyped_calls = true
disallow_untyped_decorators = true
disallow_untyped_defs = true
ignore_missing_imports = true
implicit_reexport = false
no_implicit_optional = true
show_column_numbers = true
show_error_codes = true
show_error_context = true
strict_equality = true
strict_optional = true
warn_no_return = true
warn_redundant_casts = true
warn_unreachable = true
warn_unused_configs = true