Skip to content

Commit 585571d

Browse files
committed
fix tests by reverting PTH120
1 parent 593fe3d commit 585571d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/pre_commit_terraform/terraform_docs_replace.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import subprocess
99
import warnings
1010
from argparse import ArgumentParser, Namespace
11-
from pathlib import Path
1211
from typing import cast as cast_to
1312

1413
from ._structs import ReturnCode
@@ -75,7 +74,9 @@ def invoke_cli_app(parsed_cli_args: Namespace) -> ReturnCodeType:
7574
if os.path.realpath(filename) not in dirs and (
7675
filename.endswith(('.tf', '.tfvars'))
7776
):
78-
dirs.append(str(Path(filename).parent))
77+
# PTH120 - It should use 'pathlib', but this hook is deprecated and
78+
# we don't want to spent time on testing fixes for it
79+
dirs.append(os.path.dirname(filename)) # noqa: PTH120
7980

8081
retval = ReturnCode.OK
8182

0 commit comments

Comments
 (0)