-
Notifications
You must be signed in to change notification settings - Fork 2
/
pyproject.toml
119 lines (102 loc) · 2.77 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
[tool.poetry]
name = "BJBot"
version = "0.1.0"
description = "Blackjack TG Bot"
authors = ["Artyom Kornikov <[email protected]>"]
[tool.poetry.dependencies]
python = "^3.11"
aiohttp = "^3.8.3"
aiohttp-apispec = "^3.0.0b2"
aiohttp-session = {extras = ["secure"], version = "^2.12.0"}
aiolimiter = "^1.0.0"
asyncpg = "^0.27.0"
alembic = "^1.9.0"
marshmallow = "^3.19.0"
psycopg = {extras = ["binary"], version = "^3.1.6"}
psycopg2-binary = "^2.9.5"
pydantic = {extras = ["dotenv", "email"], version = "^1.10.2"}
SQLAlchemy = "^1.4.45"
[tool.poetry.dev-dependencies]
aiohttp-devtools = "^1.0.post0"
black = "^22.12.0"
isort = "^5.11.4"
mypy = "^0.991"
pylint = "^2.15.9"
pytest = "^7.2.0"
pytest-aiohttp = "^1.0.4"
pytest-cov = "^4.0.0"
SQLAlchemy-Utils = "^0.38.3"
sqlalchemy2-stubs = "^0.0.2-alpha.30"
types-psycopg2 = "^2.9.21.2"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
# PYTEST
[tool.pytest.ini_options]
asyncio_mode = "auto"
# Remove filterwarnings after apispec 6.x+ version upgrade:
filterwarnings = [
"ignore:distutils Version classes are deprecated",
"ignore:msvc9compiler is deprecated",
]
[tool.coverage.html]
directory = "pytest-cov-report"
# LINTERS
# mypy
[tool.mypy]
no_error_summary = true
check_untyped_defs = true
disallow_incomplete_defs = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
disallow_any_generics = true
no_implicit_reexport = true
plugins = [
"pydantic.mypy",
"sqlalchemy.ext.mypy.plugin",
]
[[tool.mypy.overrides]]
module = "aiohttp_apispec.*"
ignore_missing_imports = true
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
warn_untyped_fields = true
# pylint
[tool.pylint.basic]
good-names = ["db"]
[tool.pylint.format]
max-line-length = 88
[tool.pylint.master]
extension-pkg-allow-list = ["pydantic"]
[tool.pylint.typecheck]
ignored-classes='sqlalchemy.orm.session.sessionmaker'
[tool.pylint."MESSAGES CONTROL"]
disable = [
"C0103", # class constant name doesn't conform to UPPER_CASE
"C0114", # missing-module-docstring
"C0115", # missing-class-docstring (for api routes)
"C0116", # missing-function-docstring
"E1102", # not-callable (false positives)
"E1133", # non-iterable value is used in an iterating context
"E1136", # unsubscriptable-object (false positive getting str[0] from Optional[str])
"R0902", # too-many-instance-attributes
"R0903", # too-few-public-methods (for sqlalchemy tables and pydantic classes)
"R0913", # too-many-arguments
"W0511", # fix me / TO DO checks
]
# isort
[tool.isort]
profile = 'black'
lines_after_imports = 2
# black
[tool.black]
line-length = 88
target-version = ['py310']
skip-string-normalization = true
check = true
color = true
diff = true
quiet = true