chore: mypy, ruff, extract, openapi, and recipes-scraper updates (#1968)

* bump ruff and mypy

* mypy fixes

* bump and fix openapi

* drop debug statement

* bump extruct

* bump recipes-scrapers
This commit is contained in:
Hayden
2023-01-01 14:47:27 -08:00
committed by GitHub
parent e329e1cd15
commit 4d5550ad85
27 changed files with 173 additions and 135 deletions

View File

@@ -35,7 +35,7 @@ class MinifierOptions:
class ABCMinifier(ABC):
def __init__(self, purge=False, opts: MinifierOptions = None, logger: Logger = None):
def __init__(self, purge=False, opts: MinifierOptions | None = None, logger: Logger | None = None):
self._purge = purge
self._opts = opts or MinifierOptions()
self._logger = logger or Logger("Minifier")
@@ -60,7 +60,7 @@ class ABCMinifier(ABC):
class PillowMinifier(ABCMinifier):
@staticmethod
def to_webp(image_file: Path, dest: Path = None, quality: int = 100) -> Path:
def to_webp(image_file: Path, dest: Path | None = None, quality: int = 100) -> Path:
"""
Converts an image to the webp format in-place. The original image is not
removed By default, the quality is set to 100.