We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 593fe3d commit 585571dCopy full SHA for 585571d
src/pre_commit_terraform/terraform_docs_replace.py
@@ -8,7 +8,6 @@
8
import subprocess
9
import warnings
10
from argparse import ArgumentParser, Namespace
11
-from pathlib import Path
12
from typing import cast as cast_to
13
14
from ._structs import ReturnCode
@@ -75,7 +74,9 @@ def invoke_cli_app(parsed_cli_args: Namespace) -> ReturnCodeType:
75
74
if os.path.realpath(filename) not in dirs and (
76
filename.endswith(('.tf', '.tfvars'))
77
):
78
- dirs.append(str(Path(filename).parent))
+ # PTH120 - It should use 'pathlib', but this hook is deprecated and
+ # we don't want to spent time on testing fixes for it
79
+ dirs.append(os.path.dirname(filename)) # noqa: PTH120
80
81
retval = ReturnCode.OK
82
0 commit comments