-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
137 lines (128 loc) · 4.71 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
[tool.poetry]
name = "ballballcs"
version = "0.1.0"
description = "It's a CS-inspired top-down perspective shooter game with 2D ball characters and intense gameplay, and it lets users focus on tactical decisions."
authors = ["Mason Lin <[email protected]>"]
license = "MIT"
readme = "README.md"
[tool.poetry.dependencies]
python = "^3.9"
fastapi = {extras = ["all"], version = "^0.109.2"}
uvicorn = {extras = ["standard"], version = "^0.27.1"}
httpx = "0.26.0"
pygame = "^2.5.2"
[tool.poetry.group.dev.dependencies]
pytest = "^8.0.0"
coverage = {extras = ["toml"], version = "^7.4.1"}
pytest-asyncio = "^0.23.5"
pytest-mock = "^3.12.0"
pytest-xdist = "^3.5.0"
pylama = {extras = ["all"], version = "^8.4.1"}
black = "^24.1.1"
pre-commit = "^3.6.1"
pytest-cov = "^4.1.0"
bandit = "^1.7.7"
ruff = "^0.2.1"
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-ra -s -v --log-cli-level=DEBUG -p no:warnings --junitxml=junit.xml --strict-markers"
asyncio_mode = "strict"
norecursedirs = ["integration"]
[tool.coverage.run]
branch = true
relative_files = true
omit = ["src/tests/*"]
[tool.pylama]
format = "pylint"
skip = "*/.env/*,static/*"
linters = "pylint"
[tool.pylama.linter.pylint]
max_line_length = 140
disable = "C,R,W"
extension-pkg-whitelist = "pydantic,pygame"
[tool.codespell]
builtin = "clear,rare,informal,code,names,en-GB_to_en-US"
ignore-words-list = "master,deque"
quiet-level = 3
skip = ".git,*.lock,htmlcov,log,*.yml,*.xml,*.csv"
[tool.ruff]
# https://beta.ruff.rs/docs/rules/
extend-exclude = ["integration", "tests", "src/tests", "scripts"]
# The following rules are currently not implemented by ruff, but we intend to ignore
# "E203","W503","W0511","W0613","W0703","W0707","W1203",
ignore = [
"B008", # do not perform function calls in argument defaults
"B904", # Within an except clause, raise exceptions with raise ... from err or raise ... from None to distinguish them from errors in exception handling
"C901", # mccabe, too complex
"D1", # missing public docstrings
"D203", # 1 blank line required before class docstring
"D205", # 1 blank line required between summary line and description
"D213", # Multi-line docstring summary should start at the second line
"D400", # First line should end with a period
"D401", # (docstring imperative mood) Overly restrictive.
"D404", # First word of the docstring should not be "This"
"D417", # Missing argument descriptions in the docstring
"DTZ005", # The use of `datetime.datetime.now()` without `tz` argument is not allowed
"E402", # Module level import not at top of file
"E501", # line too long, handled by black
'E722', # (bare exception): There are many places where we want to catch a maximally generic exception.
"E731", # Do not assign a lambda expression, use a def
"E741", # ambiguous-variable-name
"EXE002", # The file is executable but no shebang is present
"G001", # logging-string-format Logging statement uses string.format()
"G002", # logging-percent-format Logging statement uses %
"G003", # logging-string-concat Logging statement uses +
"G004", # logging-f-string Logging statement uses f-string
"ERA", # eradicate, Found commented-out code
"PT023", # Use `@pytest.mark.asyncio()` over `@pytest.mark.asyncio`
"PTH123", # open() should be replaced by Path.open()
"PLR0911", # Too many return statements ({returns} > {max_returns})
"PLR0912", # Too many branches ({branches} > {max_branches})
"PLR0913", # Too many arguments to function call
"PLR2004", # Magic value used in comparison
"PGH003", # Use specific rule codes when ignoring type issues
"PGH004", # Use specific rule codes when using noqa
"RUF100", # Unused `noqa` directive
]
select = [
"A", # flake8-builtins
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"D", # pydocstyle
"DTZ", # flake8-datetimez
"EXE", # flake8-executable
"G", # flake8-logging-format
"E", # pycodestyle errors
"F", # pyflakes
"I", # isort
"ICN", # flake8-import-conventions
"ISC", # flake8-implicit-str-concat
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PLC", # Pylint Convention
"PLE", # Pylint Error
"PLR", # Pylint Refactor
"PLW", # Pylint Warning
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"PYI", # flake8-pyi
"Q", # flake8-quotes
"RET", # flake8-return
"RSE", # flake8-raise
"RUF", # ruff
"S", # flake8-bandit
"SIM", # flake8-simplify
"SLF", # flake8-self
"T10", # flake8-debugger
"T20", # flake8-print
"TID", # flake8-tidy-imports
"UP", # pyupgrade
"W", # pycodestyle warnings
]
line-length = 140
show-source = true
src = ["src", "/app"]
target-version = "py39"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"