diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b97b070..39f3607 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -39,7 +39,7 @@ repos: - id: isort - repo: https://github.com/psf/black-pre-commit-mirror - rev: 25.12.0 + rev: 26.1.0 hooks: - id: black diff --git a/scripts/vendor.py b/scripts/vendor.py index 13371f4..a9e630c 100755 --- a/scripts/vendor.py +++ b/scripts/vendor.py @@ -34,28 +34,24 @@ def apply_code_modifications(source_path: Path): # Wrap requests imports content = re.sub( r"import requests", - dedent( - r""" + dedent(r""" try: import requests except ImportError: requests = None - """ - ).strip(), + """).strip(), content, ) # Wrap dateutil imports content = re.sub( r"from dateutil.parser import isoparse", - dedent( - r""" + dedent(r""" try: from dateutil.parser import isoparse except ImportError: isoparse = None - """ - ).strip(), + """).strip(), content, )