linter should be working
This commit is contained in:
parent
cd724aa3d5
commit
c05bf2fa4d
3 changed files with 15 additions and 7 deletions
|
|
@ -20,4 +20,4 @@ jobs:
|
||||||
pip install .[lint]
|
pip install .[lint]
|
||||||
- name: Run linters
|
- name: Run linters
|
||||||
run: |
|
run: |
|
||||||
./tools/linter
|
./tools/linter check
|
||||||
|
|
@ -3,11 +3,11 @@ from abc import ABC
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Dict
|
from typing import Dict
|
||||||
from typing import TypeVar
|
|
||||||
from typing import Generic
|
from typing import Generic
|
||||||
from typing import List
|
from typing import List
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
from typing import Type
|
from typing import Type
|
||||||
|
from typing import TypeVar
|
||||||
|
|
||||||
import yt_dlp as ytdl
|
import yt_dlp as ytdl
|
||||||
|
|
||||||
|
|
|
||||||
18
tools/linter
18
tools/linter
|
|
@ -1,5 +1,13 @@
|
||||||
# Run within root directory. Runs isort, black, then pylint
|
# Run within root directory
|
||||||
isort .
|
|
||||||
black .
|
if [ $1 = "check" ]; then
|
||||||
pylint src/
|
isort . --check-only --diff \
|
||||||
pydocstyle src/*
|
&& black . --check \
|
||||||
|
&& pylint src/ \
|
||||||
|
&& pydocstyle src/*
|
||||||
|
else
|
||||||
|
isort .
|
||||||
|
black .
|
||||||
|
pylint src/
|
||||||
|
pydocstyle src/*
|
||||||
|
fi
|
||||||
Loading…
Reference in a new issue