1
0
Fork 0
mirror of https://github.com/ansible-collections/hetzner.hcloud.git synced 2026-02-03 23:51:48 +00:00

[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2026-01-18 09:41:49 +00:00
parent 51cafbcd57
commit ff5e435d5b

View file

@ -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,
)