Compare commits

..

5 commits

Author SHA1 Message Date
d5a248733a
fix(pterodactyl): fix a ruff violation
Some checks failed
Actions / Build Documentation (MkDocs) (push) Successful in 44s
Actions / Lint Code (Ruff & Pylint) (push) Failing after 51s
2025-01-26 13:09:15 +00:00
5decc51a36
chore(deps): update 2025-01-26 13:08:33 +00:00
41678ef3ed
chore(repo): enable more ruff linting rules 2025-01-26 13:08:28 +00:00
0492b30662
chore(repo): add two paths to gitignore 2025-01-26 13:08:02 +00:00
3063721b8d
chore(vscode): add some settings overrides 2025-01-26 13:07:46 +00:00
5 changed files with 388 additions and 376 deletions

2
.gitignore vendored
View file

@ -3,3 +3,5 @@ site
.venv
.data
__pycache__
.mypy_cache/
.ruff_cache/

11
.vscode/settings.json vendored
View file

@ -1,6 +1,5 @@
{
"[python]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll": "explicit"
},
@ -8,5 +7,15 @@
},
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"[jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"editor.formatOnSave": true,
"files.exclude": {
"**/.git": true,
"**/__pycache__": true,
"**/.ruff_cache": true,
"**/.mypy_cache": true
}
}

View file

@ -3,8 +3,8 @@ import aiohttp
async def get_status(host: str, port: int = 25565) -> tuple[bool, dict]:
async with aiohttp.ClientSession() as session:
async with session.get(f'https://api.mcsrvstat.us/2/{host}:{port}') as response:
response = await response.json()
if response['online']:
async with session.get(f"https://api.mcsrvstat.us/2/{host}:{port}") as response:
response = await response.json() # noqa: PLW2901
if response["online"]:
return (True, response)
return (False, response)

View file

@ -84,7 +84,7 @@ target-version = "py311"
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
# McCabe complexity (`C901`) by default.
select = ["I", "N", "F", "W", "E", "G", "INP", "T20", "PLC", "PLE", "PLW", "PLR"]
select = ["I", "N", "F", "W", "E", "G", "INP", "T20", "PLC", "PLE", "PLW", "PLR", "LOG"]
ignore = ["PLR0912", "PLR0915", "PLR2004"]
# Allow fix for all enabled rules (when `--fix`) is provided.

743
uv.lock generated

File diff suppressed because it is too large Load diff