target py3.9

This commit is contained in:
Mylloon 2023-05-29 11:48:54 +02:00
parent 2a4026212d
commit ff2a2a01da
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
2 changed files with 5 additions and 4 deletions

View file

@ -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<filename>.+):(?P<line_number>\d+):(?P<column_number>\d+):"
+ r" warning: code should be clang-formatted \[(?P<warning_message>.+)\]"
r" warning: code should be clang-formatted \[(?P<warning_message>.+)\]"
)
error_matches = re.finditer(error_pattern, output)

View file

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