-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
90 lines (78 loc) · 2.05 KB
/
pyproject.toml
File metadata and controls
90 lines (78 loc) · 2.05 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
[tool.poetry]
name = "app"
version = "0.1.0"
description = ""
authors = ["Martín Cepeda <mocepeda@uc.cl>"]
[tool.poetry.dependencies]
python = "~3.11"
fastapi = "0.95.2"
[tool.poetry.group.dev.dependencies]
mypy = "1.1.1"
pytest-asyncio = "0.20.3"
pytest = "7.2.2"
pytest-mock = "3.10.0"
pyclean = "2.7.0"
ruff = "0.0.267"
uvicorn = {extras = ["standard"], version = "0.22.0"}
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
## Tools
[tool.black]
target-version = ['py311']
line_length = 100
experimental-string-processing = true
[tool.ruff]
line-length = 100
target-version = "py311"
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
"C", # flake8-comprehensions
"B", # flake8-bugbear
"S", # flake8-bandit
"A", # flake8-builtins
"INP", # flake8-no-pep420
"PIE", # flake8-pie
"PL", # pylint
]
ignore = [
"UP015", # Unnecessary open mode parameters
"PLC1901", # compare-to-empty-string
]
[tool.isort]
profile = "black"
sections = "FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER"
[tool.mypy]
python_version = 3.11
plugins = "pydantic.mypy"
# Strict guidelines taken from https://github.com/pytorch/pytorch/blob/master/mypy-strict.ini
cache_dir = ".mypy_cache/strict"
strict_optional = true
hide_error_codes = false
show_column_numbers = true
warn_no_return = true
disallow_any_unimported = true
# Across versions of mypy, the flags toggled by --strict vary. To ensure
# we have reproducible type check, we instead manually specify the flags
warn_unused_configs = true
disallow_any_generics = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
warn_redundant_casts = true
warn_return_any = true
implicit_reexport = false
strict_equality = true
[tool.pytest.ini_options]
log_cli = true
log_cli_level = 10
testpaths = ["tests"]
asyncio_mode = "strict"