Skip to content

Commit a4cb103

Browse files
author
Abhijit Sarkar
committed
Replace flake8 and pylint with ruff and mypy, fix mypy errors
1 parent 090fd46 commit a4cb103

File tree

68 files changed

+304
-708
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+304
-708
lines changed

.flake8

Lines changed: 0 additions & 12 deletions
This file was deleted.

.github/run.sh

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,10 @@ fi
4343
if (( no_lint == 0 )); then
4444
if [[ -z "${CI}" ]]; then
4545
"$bin_dir"black "$basedir"
46+
"$bin_dir"ruff --fix "$basedir"
4647
else
4748
"$bin_dir"black --check "$basedir"
49+
"$bin_dir"ruff "$basedir"
4850
fi
49-
"$bin_dir"flake8 "$basedir"
50-
"$bin_dir"pylint \
51-
--rcfile ./.pylintrc \
52-
--score n \
53-
--ignore-patterns '^.*_test\.py$, ^test_.*\.py$' \
54-
--disable C0103,C0104,C0114,C0115,C0116,W0311 \
55-
"$basedir"/**/*.py
51+
"$bin_dir"mypy --explicit-package-bases "$basedir" --strict
5652
fi

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: CI
22

3-
on: [ push ]
3+
on: [push, workflow_dispatch]
44

55
jobs:
66
Build:
@@ -18,6 +18,6 @@ jobs:
1818
python -m pip install --upgrade pip
1919
pip install -r requirements.txt
2020
- name: Test
21-
run: .github/run.sh --no-lint
21+
run: ./.github/run.sh --no-lint
2222
- name: Lint
23-
run: .github/run.sh --no-test
23+
run: ./.github/run.sh --no-test

.gitignore

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@
66
# PyCharm
77
.idea
88

9-
# Jupyter Notebook
10-
.ipynb_checkpoints
11-
129
# Python
1310
*.pyc
1411
__pycache__
12+
venv
1513

1614
# Pytest
1715
.pytest_cache
16+
17+
# Mypy
18+
.mypy_cache
19+
20+
# ruff
21+
.ruff_cache

0 commit comments

Comments
 (0)