Skip to content

Commit 298d6b0

Browse files
committed
добавил linter
1 parent 3f67942 commit 298d6b0

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

.github/workflows/linter.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Linter
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
7+
build:
8+
runs-on: ubuntu-latest
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
python-version: ["3.11"]
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Set up Python ${{ matrix.python-version }}
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: ${{ matrix.python-version }}
19+
cache: 'pip'
20+
cache-dependency-path: requirements.txt
21+
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install -U pip
25+
pip install --upgrade pip setuptools
26+
pip install flake8 mypy black~=24.0 isort wheel types-requests
27+
pip install -r requirements.txt
28+
29+
- name: Lint with mypy
30+
run: |
31+
mypy --ignore-missing-imports .
32+
33+
- name: Lint with black
34+
run: |
35+
black --check --verbose --diff .
36+
37+
- name: Lint with flake8
38+
run: |
39+
flake8 --count --verbose --max-line-length=88 --extend-ignore=E501,W391,C901,E203 --statistics .

0 commit comments

Comments
 (0)