-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
92 lines (76 loc) · 2.88 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
[tool.poetry]
name = "arma_server_query"
version = "0.1.0"
description = "Query Arma 3 Servers for Players"
authors = ["Sami Laine <[email protected]>"]
readme = "README.md"
[tool.poetry.scripts]
arma-server-query = "arma_server_query.cli:cli"
[tool.poetry.dependencies]
python = "^3.11"
# Note: Linters not defined in this file but .pre-commit-config.yaml, which
# installs/manages each tool in its own isolated virtualenv
[tool.poetry.group.test.dependencies]
pytest = "7.*"
# Test coverage
pytest-cov = "4.*"
# Clearer assertion failures (colorful diff)
pytest-clarity = "1.*"
# Valve Server Query Protocol implementation
python-a2s = "*"
[tool.poetry.group.docs.dependencies]
# Main documentation-as-code (HTML/PDF generator)
Sphinx = "*"
# Read the docs (pretty) theme for sphinx
sphinx-rtd-theme = "1.*"
# Markdown parser for sphinx: Sphinx uses "RST" files, this adds markdown
myst-parser = "*"
# Automatic Python module docs (javadoc-style)
sphinx-autodoc2 = "*"
# Generate Dash/Zeal "docsets" (offline dev-docs package) from HTML docs
doc2dash = "*"
# Astroid v3.0.0 breaks autodoc dependencies ==> pinning to <3.0.0
# See https://github.com/sphinx-extensions2/sphinx-autodoc2/issues/31
astroid = "<3.0.0"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
# Make isort work with Black
# Avoids conflicting imports
# As per https://pycqa.github.io/isort/docs/configuration/black_compatibility/#using-a-config-file-such-as-isortcfg
[tool.isort]
profile = "black"
multi_line_output = 3
# Avoid pointless warning about performance hit of f-string in loggers
[tool.pylint.message_control]
disable = ["logging-fstring-interpolation"]
[tool.pytest.ini_options]
addopts = """-vv \
--doctest-modules \
--cov=arma_server_query \
--cov-report=xml:test_results/coverage.xml \
--cov-report=html:test_results/coverage.html \
--cov-report=term \
--junit-xml=test_results/results.xml"""
[tool.ruff]
# Always fix what you can, without needing CLI flags
fix = true
unfixable = [
"ERA", # do not autoremove commented out code
]
# Black compat:
line-length = 88
extend-exclude = ["docs/*"]
# Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default.
# Add I = isort (import sorter), to remove need for isort itself
# And D = pydocstyle for docstrings
select = ["E", "F", "I", "D"]
# D400/D415 = First line (of dosctrings) should end with [.?!]
extend-ignore = ["D400", "D415"]
# Allow autofix for all enabled rules (when `--fix`) is provided.
fixable = ["A", "B", "C", "D", "E", "F", "G", "I", "N", "Q", "S", "T", "W", "ANN", "ARG", "BLE", "COM", "DJ", "DTZ", "EM", "ERA", "EXE", "FBT", "ICN", "INP", "ISC", "NPY", "PD", "PGH", "PIE", "PL", "PT", "PTH", "PYI", "RET", "RSE", "RUF", "SIM", "SLF", "TCH", "TID", "TRY", "UP", "YTT"]
# Use Google-style docstrings
pydocstyle = {convention = "google"}
[tool.mypy]
python_version = "3.11"
check_untyped_defs = true