Update .pre-commit-config.yml (#2139)

This commit is contained in:
Jonathan Plasse 2023-01-25 01:45:34 +01:00 committed by GitHub
parent 0cac1a0d21
commit 82d7814101
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 26 additions and 17 deletions

View file

@ -1,8 +1,7 @@
import os
import re
from pathlib import Path
ROOT_DIR = Path(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
ROOT_DIR = Path(__file__).resolve().parent.parent
def dir_name(linter_name: str) -> str:
@ -15,4 +14,4 @@ def pascal_case(linter_name: str) -> str:
def get_indent(line: str) -> str:
return re.match(r"^\s*", line).group() # pyright: ignore[reportOptionalMemberAccess]
return re.match(r"^\s*", line).group() # type: ignore[union-attr]