mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-07 09:00:31 +00:00
Update .pre-commit-config.yml (#2139)
This commit is contained in:
parent
0cac1a0d21
commit
82d7814101
5 changed files with 26 additions and 17 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue