-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathpyproject.toml
98 lines (89 loc) · 2.05 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
[tool.ruff]
exclude = [
".eggs",
".git",
".hg",
".mypy_cache",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"venv",
"src/infrastructure/database/migrations/versions",
"src/infrastructure/database/migrations_arbitrary/versions",
]
line-length = 120
indent-width = 4
target-version = "py310"
src = ["src"]
[tool.ruff.lint]
select = ["E4", "E7", "E9", "F", "C901", "E5", "I"]
ignore = []
[tool.ruff.format]
skip-magic-trailing-comma = false
indent-style = "space"
line-ending = "auto"
[tool.ruff.lint.mccabe]
max-complexity = 15
[tool.ruff.lint.isort]
known-local-folder = ["src"]
[tool.pytest.ini_options]
addopts = '-s -v'
asyncio_mode = 'auto'
cache_dir = '/tmp'
python_files = 'tests.py test_*.py *_test.py'
python_functions = 'test_* *_test'
filterwarnings = ['ignore::RuntimeWarning', 'ignore::UserWarning']
env = [
"ENV=testing",
"DATABASE__HOST=postgres",
"DATABASE__PORT=5432",
"DATABASE__PASSWORD=postgres",
"DATABASE__USER=postgres",
"DATABASE__DB=test",
"ARBITRARY_DB=test_arbitrary",
"TASK_ANSWER_ENCRYPTION__BATCH_LIMIT=1",
"CDN__LEGACY_REGION=us-east-1",
"CDN__LEGACY_BUCKET=testing"
]
[tool.coverage.run]
omit = [
"*/conftest.py",
"*/test_*.py",
"*/tests/*",
"*/migrations/*",
"*/jsonld_converter/*",
"*/migrations_arbitrary/*"
]
[tool.mypy]
plugins = ["pydantic.mypy"]
ignore_missing_imports = true
python_version = '3.11'
mypy_path = 'src'
files = ['*.py']
warn_redundant_casts = true
warn_unused_ignores = true
show_error_codes = true
namespace_packages = true
exclude = ["apps/jsonld_converter"]
# Silence "type import errors" as our 3rd-party libs does not have types
# Check: https://mypy.readthedocs.io/en/latest/config_file.html#import-discovery
follow_imports = 'silent'
[[tool.mypy.overrides]]
module = [
'mixer.*',
'sqlalchemy.*',
'boto3',
'fastapi_mail',
'pyfcm',
'requests',
]
ignore_missing_imports = true