-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
158 lines (140 loc) · 3.62 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
[tool.ruff]
src = ["src"]
line-length = 120
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"N", # pep8-naming (N)
"YTT", # flake8-2020
"C", # flake8-comprehensions
"B", # flake8-bugbear
"T20", # flake8-print
"RET", # flake8-return
"SLF", # flake8-self
"ARG", # flake8-unused-arguments
"TCH", # flake8-type-checking
"RUF", # Ruff-specific rules
]
ignore = [
"B008", # do not perform function calls in argument defaults
"C901", # too complex
"B904", # `except` clause, raise exceptions with `raise,
"B027", # is an empty method in an abstract base class
"B024", # abstract base class, but it has no abstract methods
"B026", # Star-arg unpacking after a keyword argument is strongly discouraged
"B905", # `zip()` without an explicit `strict=` parameter
"E701", # multiple statements on one line
]
# flake8 previously used the following codes:
# E701 E231 E225 E999 W503 E251 C901 I004 E800 B008 B024 B026 B028
target-version = "py311"
[tool.ruff.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10
# ISORT CONFIGURATION USED BY RUFF
[tool.ruff.isort] # https://beta.ruff.rs/docs/settings/#isort
force-sort-within-sections = true
force-wrap-aliases = true
combine-as-imports = true
# The sections and order of the imports
section-order = [
"future",
"standard-library",
"third-party",
"first-party",
"local-folder",
]
# Our libraries used on the project, must be added here, then they will be groupped together
known-first-party = []
# Our local folders used on the project, must be added here, then they will be groupped together
known-local-folder = [
"app",
"auth",
"config",
"core",
"filmin",
"infra",
"shared",
"utils",
]
# Third party libraries used on the project, must be added here, then they will be groupped together
known-third-party = [
"beartype",
"bcrypt",
"colorlog",
"fastapi",
"pydantic",
"pytest",
"typer",
"yaml",
]
lines-after-imports = 2
lines-between-types = 1
[tool.ruff.flake8-bugbear]
extend-immutable-calls = ["fastapi.Depends", "fastapi.Query"]
[tool.black]
line-length = 120
skip-string-normalization = true
target-version = ['py311']
include = '\.pyi?$'
exclude = '''
(
/(
\.eggs # exclude a few common directories in the
| \.git # root of the project
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
| migrations
)/
| foo.py # also separately exclude a file named foo.py in
# the root of the project
)
'''
[tool.pylint]
max-line-length = 120
disable = ["C0112", "C0114", "C0115", "C0116"]
[tool.poetry]
name = "abusquets-portfolio"
version = "0.1.0"
description = ""
authors = ["Alexandre Busquets Triola <abusquets@gmail.com>"]
readme = "README.md"
packages = []
[tool.poetry.dependencies]
python = "^3.11"
fastapi = "^0.100.1"
uvicorn = "0.22.0"
pydantic = "^2.1.1"
pyyaml = "^6.0"
colorlog = "^6.7.0"
sqlalchemy = "^2.0.19"
alembic = "^1.11.1"
bcrypt = "^4.0.1"
asyncpg = "^0.27.0"
httpx = "^0.24.1"
click = "^8.1.3"
pycountry = "^22.3.5"
python-jose = { extras = ["cryptography"], version = "^3.3.0" }
redis = "^4.6.0"
pydantic-settings = "^2.0.1"
[tool.poetry.group.dev.dependencies]
debugpy = "^1.6.7"
pytest = "^7.3.2"
pytest-env = "^0.8.1"
pytest-cov = "^4.1.0"
pytest-asyncio = "^0.21.0"
poetry-types = "^0.4.0"
beartype = "^0.14.1"
types-redis = "^4.6.0.2"
faker = "^19.3.0"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"