From ff2a2a01da0c89e27e67461251a1156640ce52d5 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Mon, 29 May 2023 11:48:54 +0200 Subject: [PATCH] target py3.9 --- main.py | 5 +++-- pyproject.toml | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index d0ac950..2772127 100644 --- a/main.py +++ b/main.py @@ -1,6 +1,7 @@ import re import subprocess import sys +from typing import Union from src.errors import ClangError @@ -23,10 +24,10 @@ def clang_format(file_path): return output -def parse_clang_format_output(output) -> None | list[ClangError]: +def parse_clang_format_output(output) -> Union[None, list[ClangError]]: error_pattern = ( r"(?P.+):(?P\d+):(?P\d+):" - + r" warning: code should be clang-formatted \[(?P.+)\]" + r" warning: code should be clang-formatted \[(?P.+)\]" ) error_matches = re.finditer(error_pattern, output) diff --git a/pyproject.toml b/pyproject.toml index 5d70e2b..f4196c0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,8 +1,8 @@ # https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html#configuration-format [tool.black] -target-version = ["py311"] +target-version = ["py39"] # https://beta.ruff.rs/docs/settings/ [tool.ruff] -target-version = "py311" +target-version = "py39" extend-select = ["I"] # enable isort extension