Skip to content

Commit

Permalink
Merge pull request #93 from krobelus/squelch-pylint-false-positive
Browse files Browse the repository at this point in the history
Disable false positive Pylint warning
  • Loading branch information
Manishearth authored Jul 31, 2021
2 parents 0091a19 + 38348c6 commit 68cfb84
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions gitrevise/odb.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ def __init__(self, cwd: Optional[Path] = None) -> None:

self.index = Index(self)

self._catfile = Popen(
# Pylint 2.8 emits a false positive; fixed in 2.9.
self._catfile = Popen( # pylint: disable=consider-using-with
["git", "cat-file", "--batch"],
bufsize=-1,
stdin=PIPE,
Expand Down Expand Up @@ -242,7 +243,10 @@ def __exit__(
def get_tempdir(self) -> Path:
"""Return a temporary directory to use for modifications to this repository"""
if self._tempdir is None:
self._tempdir = TemporaryDirectory(prefix="revise.", dir=str(self.gitdir))
# Pylint 2.8 emits a false positive; fixed in 2.9.
self._tempdir = TemporaryDirectory( # pylint: disable=consider-using-with
prefix="revise.", dir=str(self.gitdir)
)
return Path(self._tempdir.name)

def git_path(self, path: Union[str, Path]) -> Path:
Expand Down

0 comments on commit 68cfb84

Please sign in to comment.