mirror of
https://github.com/RGBCube/minearchy-bot
synced 2025-07-27 08:57:46 +00:00
Fix lint.py
This commit is contained in:
parent
92095af057
commit
3813a869f7
3 changed files with 6 additions and 3 deletions
5
.github/workflows/scripts/lint.py
vendored
5
.github/workflows/scripts/lint.py
vendored
|
@ -2,9 +2,12 @@ from __future__ import annotations
|
||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
ROOT_DIR = Path(__file__).resolve().parent.parent.parent / "minearchy_bot"
|
ROOT_DIR = Path(__file__).resolve().parent.parent.parent.parent / "minearchy_bot"
|
||||||
|
|
||||||
for fp in ROOT_DIR.rglob("__init__.py"):
|
for fp in ROOT_DIR.rglob("__init__.py"):
|
||||||
|
if fp.parent.name == "minearchy_bot":
|
||||||
|
continue
|
||||||
|
|
||||||
if not (content := fp.read_text()):
|
if not (content := fp.read_text()):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|
2
lint.sh
2
lint.sh
|
@ -7,7 +7,7 @@ unimport ./ --ignore-init --gitignore -r
|
||||||
isort ./
|
isort ./
|
||||||
|
|
||||||
# run our lint script
|
# run our lint script
|
||||||
python ./.github/workflows/lint.py
|
python ./.github/workflows/scripts/lint.py
|
||||||
|
|
||||||
# run flynt
|
# run flynt
|
||||||
flynt ./ -tc
|
flynt ./ -tc
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from asyncio import gather as await_parallel
|
||||||
from contextlib import suppress as suppress_error
|
from contextlib import suppress as suppress_error
|
||||||
from traceback import format_exception as format_exit
|
from traceback import format_exception as format_exit
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
from asyncio import gather as await_parallel
|
|
||||||
|
|
||||||
from discord import HTTPException
|
from discord import HTTPException
|
||||||
from discord.ext.commands import (
|
from discord.ext.commands import (
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue