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]
|
||||
- name: Run linters
|
||||
run: |
|
||||
./tools/linter
|
||||
./tools/linter check
|
||||
|
|
@ -3,11 +3,11 @@ from abc import ABC
|
|||
from contextlib import contextmanager
|
||||
from pathlib import Path
|
||||
from typing import Dict
|
||||
from typing import TypeVar
|
||||
from typing import Generic
|
||||
from typing import List
|
||||
from typing import Optional
|
||||
from typing import Type
|
||||
from typing import TypeVar
|
||||
|
||||
import yt_dlp as ytdl
|
||||
|
||||
|
|
|
|||
18
tools/linter
18
tools/linter
|
|
@ -1,5 +1,13 @@
|
|||
# Run within root directory. Runs isort, black, then pylint
|
||||
isort .
|
||||
black .
|
||||
pylint src/
|
||||
pydocstyle src/*
|
||||
# Run within root directory
|
||||
|
||||
if [ $1 = "check" ]; then
|
||||
isort . --check-only --diff \
|
||||
&& black . --check \
|
||||
&& pylint src/ \
|
||||
&& pydocstyle src/*
|
||||
else
|
||||
isort .
|
||||
black .
|
||||
pylint src/
|
||||
pydocstyle src/*
|
||||
fi
|
||||
Loading…
Reference in a new issue