-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
103 lines (91 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
99
100
101
102
103
[project]
name = "Report a Suspected Breach of Trade Sanctions"
description = "Report a Suspected Breach of Trade Sanctions"
version = "0.0.1"
authors = [
"Chris Pettinga <[email protected]>",
"Jennifer Riordan <[email protected]>",
"Nawaz Ahmed <[email protected]>",
"Morgan Rees <[email protected]>"
]
readme = "README.md"
repository = "https://github.com/uktrade/report-a-breach"
[tool.coverage.run]
branch = true
[tool.coverage.report]
omit = [
'*/migrations/*',
'*/site-packages/*',
'manage.py',
'*/.pycharm_helpers/*',
'*/pycharm/*',
]
exclude_lines = [
# Don't complain about missing debug-only code:
'def __repr__',
'if self\.debug',
# Don't complain if tests don't hit defensive assertion code:
'raise AssertionError',
'raise NotImplementedError',
# Don't complain if non-runnable code isn't run:
'if 0:',
'if __name__ == .__main__.:',
]
[tool.flake8]
max-line-length = 130
exclude = """
/(
*/migrations/*
*/question_content.py
)/
"""
extend-ignore = ["F405"]
[tool.black]
line-length = 130
target-version = ['py311']
exclude = '''
/(
\.eggs
| \.git
| \.mypy_cache
| \.venv
| _build
| .venv
| tests-reports
| venv
| .env
| sanctions_regimes
)/
'''
[tool.isort]
profile = "black"
skip = [".gitignore", ".dockerignore", "migrations", "static", "templates", "manage.py"]
[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "django_app.config.settings.test"
testpaths = "tests"
python_files = ["tests.py", "test_*.py", "*_tests.py"]
addopts = """
--reuse-db
--ds=config.settings.test
"""
django_find_project = false
pythonpath = "django_app"
[tool.mypy]
warn_unused_configs = true
disallow_untyped_defs = true
warn_return_any = false
disable_error_code = [
"import-untyped",
"attr-defined",
"var-annotated",
"misc",
"import-not-found,"
]
exclude = [
"^tests/$",
"settings/$",
"migrations/$",
]
[[tool.mypy.overrides]]
module = "django_app"
ignore_missing_imports = true