Skip to content

Commit

Permalink
Update to match new checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Qalthos committed Sep 11, 2023
1 parent 1dbbe33 commit 3f249da
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions .config/dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ pipx
pkgcache # linux
pkgs
placefolder
plainexamples
pluggy
pluginmanager
pmrun
Expand Down
7 changes: 5 additions & 2 deletions src/ansiblelint/file_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,11 @@ def __init__(
_ = self.data # pylint: disable=pointless-statement

if self.kind == "plugin":
# pylint: disable=consider-using-with
self.file = NamedTemporaryFile(
mode="w+", suffix=f"_{name.name}.yaml", dir=self.dir
mode="w+",
suffix=f"_{name.name}.yaml",
dir=self.dir,
)
self.filename = self.file.name
self._content = self.parse_examples_from_plugin()
Expand All @@ -267,7 +270,7 @@ def __init__(
self.base_kind = "text/yaml"


def __del__(self):
def __del__(self) -> None:
if hasattr(self, "file"):
self.file.close()

Expand Down

0 comments on commit 3f249da

Please sign in to comment.