diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cc3441b..2cc8cf6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v6.0.0 hooks: - id: trailing-whitespace - id: check-yaml @@ -13,7 +13,7 @@ repos: - id: jupyter-notebook-cleanup args: - --remove-kernel-metadata -- repo: https://github.com/psf/black - rev: 22.12.0 +- repo: https://github.com/psf/black-pre-commit-mirror + rev: 26.3.1 hooks: - id: black \ No newline at end of file diff --git a/scripts/process_data.py b/scripts/process_data.py index b4a82a1..433d8a9 100644 --- a/scripts/process_data.py +++ b/scripts/process_data.py @@ -172,13 +172,15 @@ def buses_from_lines(lines, geocode=True): lambda s: re.sub(r"([a-z])([A-Z])", r"\1 \2", s) if isinstance(s, str) else s ) buses["name"] = buses.name.apply( - lambda s: s.replace("ue", "ü") - .replace("ae", "ä") - .replace("oe", "ö") - .replace("Itzehö", "Itzehoe") - .replace("Daürsberg", "Dauersberg") - if isinstance(s, str) and s[-2:] in ["DE", "AT"] - else s + lambda s: ( + s.replace("ue", "ü") + .replace("ae", "ä") + .replace("oe", "ö") + .replace("Itzehö", "Itzehoe") + .replace("Daürsberg", "Dauersberg") + if isinstance(s, str) and s[-2:] in ["DE", "AT"] + else s + ) ) if geocode: buses = pd.concat([buses, buses.name.apply(locate)], axis=1)