This repository has been archived by the owner on Sep 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
101 lines (87 loc) · 3.29 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
[tool.poetry]
name = "skole-backend"
version = "1.0.0"
description = "Backend of Skole"
authors = ["Skole <[email protected]>"]
packages = [
{ include = "skole" },
]
exclude = [
"skole/**/*.po",
"skole/fixtures/test-data.yaml",
"skole/tests/",
]
[tool.poetry.dependencies]
python = "^3.9"
dj-database-url = "0.5.0"
django = "3.2.2"
django-amazon-ses = "4.0.0"
django-autoslug = "1.9.8"
django-cors-headers = "3.7.0"
django-graphql-jwt = "0.3.1"
django-imagekit = "4.0.2"
django-parler = "2.2.0"
django-s3-storage = "0.13.4"
fcm-django = "0.3.10"
graphene-django = "2.15.0"
gunicorn = "20.1.0"
mat2 = "0.12.1"
pillow = "8.2.0"
psycopg2 = "2.8.6"
pyjwt = "1.7.1" # Pinned peer dependency, otherwise `django-graphql-jwt` would pull an incompatible version.
python-magic = "0.4.22"
pyyaml = "5.4.1"
requests = "2.25.1"
[tool.poetry.dev-dependencies]
autoflake = "1.4.0"
black = "21.5b0"
django-stubs = "1.8.0"
docformatter = "1.4.0"
flake8 = "3.9.2"
isort = "5.8.0"
mypy = "0.812"
pylint = "2.8.2"
pytest = "6.2.4"
pytest-cov = "2.11.1"
pytest-django = "4.2.0"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "config.settings"
django_debug_mode = "keep"
addopts = "--nomigrations --doctest-modules"
[tool.coverage.run]
branch = true
omit = [
"*/migrations/*",
"*/tests/*",
"manage.py", # Will get tested just fine when running migrations, compiling messages etc in the CI.
]
[tool.isort]
profile = "black"
[tool.pylint.master]
jobs = 0 # Use 1 process per CPU core.
[tool.pylint.messages_control]
enable = [
"useless-suppression", # Nice to get rid of unnecesary `pylint: disable` comments.
]
disable = [
"duplicate-code", # Can be judged manaually.
"fixme", # No point in not allowing this style of comments.
"invalid-name", # `qs`, `db`, and `T` are all just fine names.
"line-too-long", # Black handles this.
"logging-fstring-interpolation", # No point in using %s formatting, f-strings are just nicer: https://github.com/PyCQA/pylint/issues/1788#issuecomment-406135335
"missing-docstring", # Just insane.
"no-else-return", # Can often make the code clearer.
"no-member", # Doesn't play well with e.g. parler translated fields.
"redefined-builtin", # We are using `id` and `input` as idiomatic GraphQL parameter names.
"too-few-public-methods", # Single method mixins can be really useful, also our `constants.py` has tons of these classes.
"too-many-ancestors", # Doesn't play well with our style of heavy use of mixins and multiple inheritance.
"too-many-arguments", # Can be judged manually, most often completely valid.
"ungrouped-imports", # Can be valid when using `if TYPE_CHECKING` and anyways `isort` handles this.
"unsubscriptable-object", # There's currently a bug where subscribing Generic classes errors: https://github.com/PyCQA/pylint/issues/2822
"unused-argument", # Often an argument (e.g. `root`) just has to be there even if it's not used.
]
[tool.pylint.classes]
valid-metaclass-classmethod-first-arg = "mcs"