Skip to content

Commit

Permalink
Incorporate my dev lint script
Browse files Browse the repository at this point in the history
  • Loading branch information
ping committed Sep 5, 2023
1 parent 067baed commit 84c9db0
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ jobs:
with:
submodules: true
fetch-depth: 1
- name: Install ruff for linting
run: pip install ruff
- name: Install requirements for linting
run: pip install -r requirements-dev.txt
- name: Lint
run: ruff check calibre-plugin
run: sh lint.sh
# - name: Run tests
# run: python -m unittest -v tests
- name: Install gtext
run: sudo apt-get -y install gettext
- name: Generate commit.txt and build .mo files
Expand Down
29 changes: 29 additions & 0 deletions .mypy.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[mypy]
disable_error_code = has-type, annotation-unchecked

[mypy-calibre.*]
ignore_missing_imports = True

[mypy-qt.*]
ignore_missing_imports = True

[mypy-polyglot.*]
ignore_missing_imports = True

[mypy-bs4.*]
ignore_missing_imports = True

[mypy-lxml.*]
ignore_missing_imports = True

[mypy-calibre_plugins.*]
ignore_missing_imports = True

[mypy-calibre-plugin.overdrive.*]
ignore_errors = True

[mypy-calibre-plugin.libby.*]
ignore_errors = True

[mypy-calibre-plugin.mutagen.*]
ignore_errors = True
2 changes: 2 additions & 0 deletions lint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ruff check calibre-plugin
mypy --package calibre-plugin
2 changes: 2 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ruff
mypy

0 comments on commit 84c9db0

Please sign in to comment.