Skip to content

Commit

Permalink
Fixing mypy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
bohdanbobrowski committed Aug 22, 2024
1 parent bb51f75 commit db8a889
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/code_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ jobs:
run: |
poetry run ruff format . --check
poetry run ruff check .
# - name: Static code analysys with mypy
# run: |
# poetry run mypy .
- name: Static code analysys with mypy
run: |
poetry run mypy .
5 changes: 2 additions & 3 deletions blog2epub/common/book.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@

from blog2epub.common.cover import Cover
from blog2epub.common.interfaces import EmptyInterface
from blog2epub.crawlers import AbstractCrawler, DefaultCrawler
from blog2epub.crawlers.default import Dirs
from blog2epub.models.book import BookModel, DirModel, ArticleModel
from blog2epub.crawlers import DefaultCrawler
from blog2epub.models.book import DirModel, ArticleModel
from blog2epub.models.configuration import ConfigurationModel


Expand Down
4 changes: 3 additions & 1 deletion blog2epub/crawlers/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,9 @@ def download_image(self, img: str) -> Optional[str]:
):
picture.thumbnail(self.images_size, Image.LANCZOS) # type: ignore
converted_picture = picture.convert("L")
converted_picture.save(resized_fn, format="JPEG", quality=self.images_quality)
converted_picture.save(
resized_fn, format="JPEG", quality=self.images_quality
)
os.remove(original_fn)
return img_hash + ".jpg"
return None
Expand Down

0 comments on commit db8a889

Please sign in to comment.