diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 194f8406..74fb1c3d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ repos: - id: ruff-check args: [--fix, --exit-non-zero-on-fix] - id: ruff-format - rev: v0.16.4 + rev: v0.16.5 - repo: local hooks: - id: mypy diff --git a/CHANGELOG.md b/CHANGELOG.md index 867b3e04..46baa509 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -532,9 +532,7 @@ changed for this version. be retied or not. Example: ``` python - @retry( - exceptions = {ValueError: lambda x: "Invalid" not in str(x)} - ) + @retry(exceptions={ValueError: lambda x: "Invalid" not in str(x)}) def func() -> None: value = some_function() @@ -549,7 +547,7 @@ changed for this version. `requests` library, you can do ``` python - retry(exceptions = request_exceptions()) + retry(exceptions=request_exceptions()) ``` ### Changed @@ -1031,10 +1029,7 @@ config: MyConfig = resolver.config # With path to a yaml file: -resolver = ConfigResolver( - config_path="/path/to/config.yaml", - config_type=MyConfig -) +resolver = ConfigResolver(config_path="/path/to/config.yaml", config_type=MyConfig) config: MyConfig = resolver.config ``` @@ -1082,6 +1077,7 @@ with Extractor( ) as extractor: extractor.run() + # Using subclass: class MyExtractor(Extractor): def __init__(self):