-
Notifications
You must be signed in to change notification settings - Fork 37
/
pyproject.toml
165 lines (142 loc) · 5.38 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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
[tool.poetry]
name = "mcstatus"
version = "0.0.0" # version is handled by git tags and poetry-dynamic-versioning
description = "A library to query Minecraft Servers for their status and capabilities."
authors = ["Nathan Adams <[email protected]>"]
license = "Apache-2.0"
readme = "README.md"
repository = "https://github.com/py-mine/mcstatus"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Games/Entertainment",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: System :: Monitoring",
"Typing :: Typed",
]
packages = [
{ include = "mcstatus" },
{ include = "protocol", from = "mcstatus" },
]
[tool.poetry.dependencies]
python = ">=3.8.1,<4"
asyncio-dgram = "^2.1.2"
dnspython = "^2.4.2"
[tool.poetry.group.dev.dependencies]
pre-commit = "^3.3.3"
tox = "^3.28.0"
tox-poetry = "0.5.0" # deprecated, no sense in `^`
[tool.poetry.group.test.dependencies]
pytest = ">=7.4,<9.0"
pytest-asyncio = ">=0.23.2,<0.25.0"
pytest-cov = ">=4.1,<6.0"
pytest-rerunfailures = ">=13,<15"
coverage = "^7.3.0"
[tool.poetry.group.lint.dependencies]
ruff = "0.7.4"
coverage = "^7.3.0"
pyright = "^1.1.322"
typing-extensions = "^4.7.1"
[tool.poetry.group.docs]
optional = true
[tool.poetry.group.docs.dependencies]
sphinx = "^7.1.2"
sphinx-autodoc-typehints = ">=1.24,<3.0"
furo = ">=2022.12.7"
m2r2 = "^0.3.3"
tomli = { version = "^2.0.1", markers = "python_version < '3.11'" }
packaging = "24.2"
poetry-dynamic-versioning = "*" # actual version is in `release` group
[tool.poetry.group.release]
optional = true
[tool.poetry.group.release.dependencies]
twine = ">=4.0.2,<6.0.0"
poetry-dynamic-versioning = "^1.1.0"
[tool.poetry.group.workflow-tox]
optional = true
[tool.poetry.group.workflow-tox.dependencies]
tox-gh-actions = "^2.12.0"
poetry = "^1.5.1"
[tool.poetry.scripts]
mcstatus = 'mcstatus.__main__:main'
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "--strict-markers --doctest-modules --cov=mcstatus --cov-append --cov-branch --cov-report=term-missing -vvv --no-cov-on-fail --asyncio-mode=strict"
testpaths = ["tests"]
[tool.poetry-dynamic-versioning]
bump = true
enable = true
style = "pep440"
[tool.ruff]
target-version = "py38"
line-length = 127
[tool.ruff.lint]
select = [
"F", # Pyflakes
"W", # Pycodestyle (warnigns)
"E", # Pycodestyle (errors)
"N", # pep8-naming
"ANN", # flake8-annotations
"B", # flake8-bugbear
"FA", # flake8-future-annotations
"TID", # flake8-tidy-imports
"UP007", # flake8-new-union-types equivalent rule
"RUF", # ruff's custom rules
]
ignore = [
"ANN002", # Missing type annotation for *args
"ANN003", # Missing type annotation for **kwargs
"ANN101", # Missing type annotation for self in method
"ANN102", # Missing type annotation for cls in classmethod
"ANN204", # Missing return type annotation for special method
"B904", # Exception raised within try-except should use raise ... from exc
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
# Redundant rules with ruff-format:
"E111", # Indentation of a non-multiple of 4 spaces
"E114", # Comment with indentation of a non-multiple of 4 spaces
"E117", # Cheks for over-indented code
"D206", # Checks for docstrings indented with tabs
"D300", # Checks for docstring that use ''' instead of """
"Q000", # Checks of inline strings that use wrong quotes (' instead of ")
"Q001", # Multiline string that use wrong quotes (''' instead of """)
"Q002", # Checks for docstrings that use wrong quotes (''' instead of """)
"Q003", # Checks for avoidable escaped quotes ("\"" -> '"')
"COM812", # Missing trailing comma (in multi-line lists/tuples/...)
"COM819", # Prohibited trailing comma (in single-line lists/tuples/...)
"ISC001", # Single line implicit string concatenation ("hi" "hey" -> "hihey")
"ISC002", # Multi line implicit string concatenation
]
[tool.ruff.lint.per-file-ignores]
"test_*.py" = [
"ANN", # flake8-annotations
]
"docs/examples/code/**" = [
"FA", # flake8-future-annotations
]
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.lint.isort]
order-by-type = false
case-sensitive = true
combine-as-imports = true
# Redundant rules with ruff-format
force-single-line = false # forces all imports to appear on their own line
force-wrap-aliases = false # Split imports with multiple members and at least one alias
lines-after-imports = -1 # The number of blank lines to place after imports
lines-between-types = 0 # Number of lines to place between "direct" and import from imports
split-on-trailing-comma = false # if last member of multiline import has a comma, don't fold it to single line
[tool.ruff-formatter]
line-ending = "lf"
[build-system]
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"]
build-backend = "poetry_dynamic_versioning.backend"