Complete workflow fixing
This commit is contained in:
25
.github/workflows/code-quality.yml
vendored
Normal file
25
.github/workflows/code-quality.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
name: "Check code quality"
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ "master" ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ "master" ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
code-quality:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: "Check code quality"
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: 3.x
|
||||||
|
- name: Install all dependencies
|
||||||
|
run: pip install .[dev]
|
||||||
|
- name: Run mypy
|
||||||
|
run: mypy --pretty .
|
||||||
|
- name: Run isort
|
||||||
|
run: isort --check-only --diff .
|
||||||
|
- name: Run black
|
||||||
|
run: black --check --diff .
|
||||||
28
.github/workflows/lint.yml
vendored
28
.github/workflows/lint.yml
vendored
@@ -1,28 +0,0 @@
|
|||||||
name: "Lint"
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ "master" ]
|
|
||||||
pull_request:
|
|
||||||
# The branches below must be a subset of the branches above
|
|
||||||
branches: [ "master" ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
mypy:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Setup Python
|
|
||||||
uses: actions/setup-python@v1
|
|
||||||
with:
|
|
||||||
python-version: 3.11
|
|
||||||
architecture: x64
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v1
|
|
||||||
- name: Install mypy
|
|
||||||
run: pip install mypy
|
|
||||||
- name: Run mypy
|
|
||||||
uses: sasanquaneuf/mypy-github-action@releases/v1
|
|
||||||
with:
|
|
||||||
checkName: 'mypy' # NOTE: this needs to be the same as the job name
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
7
.isort.cfg
Normal file
7
.isort.cfg
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
[settings]
|
||||||
|
multi_line_output = 3
|
||||||
|
include_trailing_comma = True
|
||||||
|
force_grid_wrap = 0
|
||||||
|
use_parentheses = True
|
||||||
|
ensure_newline_before_comments = True
|
||||||
|
line_length = 88
|
||||||
3
format.sh
Executable file
3
format.sh
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
set -eux
|
||||||
|
find src examples -name '*.py' | xargs black
|
||||||
|
find src examples -name '*.py' | xargs isort
|
||||||
2
lint.sh
2
lint.sh
@@ -1,4 +1,2 @@
|
|||||||
find src examples -name '*.py' | xargs black
|
|
||||||
find src examples -name '*.py' | xargs isort
|
|
||||||
find src examples -name '*.py' | xargs pylint
|
find src examples -name '*.py' | xargs pylint
|
||||||
find src examples -name '*.py' | xargs mypy
|
find src examples -name '*.py' | xargs mypy
|
||||||
|
|||||||
@@ -12,8 +12,7 @@ from xml.sax.saxutils import escape
|
|||||||
|
|
||||||
import aiohttp
|
import aiohttp
|
||||||
|
|
||||||
from edge_tts.exceptions import (NoAudioReceived, UnexpectedResponse,
|
from edge_tts.exceptions import NoAudioReceived, UnexpectedResponse, UnknownResponse
|
||||||
UnknownResponse)
|
|
||||||
|
|
||||||
from .constants import WSS_URL
|
from .constants import WSS_URL
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user