diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 954ac44..08bf229 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,8 +3,8 @@ repos: rev: 5.12.0 hooks: - id: isort -- repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.272 +- repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.0.281 hooks: - id: ruff args: @@ -38,6 +38,6 @@ repos: - id: mixed-line-ending - id: trailing-whitespace - repo: https://github.com/psf/black - rev: 23.3.0 + rev: 23.7.0 hooks: - id: black diff --git a/matrix_webhook/formatters.py b/matrix_webhook/formatters.py index 8ca321b..085e1dc 100644 --- a/matrix_webhook/formatters.py +++ b/matrix_webhook/formatters.py @@ -49,7 +49,12 @@ def github(data, headers): def gitlab_gchat(data, headers): """Pretty-print a gitlab notification preformatted for Google Chat.""" - data["body"] = re.sub("<(.*?)\\|(.*?)>", "[\\2](\\1)", data["body"], re.MULTILINE) + data["body"] = re.sub( + "<(.*?)\\|(.*?)>", + "[\\2](\\1)", + data["body"], + flags=re.MULTILINE, + ) return data