diff options
author | toonn <toonn@toonn.io> | 2021-07-16 14:55:45 +0200 |
---|---|---|
committer | toonn <toonn@toonn.io> | 2021-07-20 23:17:45 +0200 |
commit | 43584fb3633f1db89ca4857d7a8dd568172ff26f (patch) | |
tree | d5114879239f64a1bb4f3400428f5dd746608411 | |
parent | f71281dd1a6cb05fa1147a956fe86b9c77342621 (diff) | |
download | ranger-43584fb3633f1db89ca4857d7a8dd568172ff26f.tar.gz |
core.runner: Disable lints because of peculiar uses of open
-rw-r--r-- | ranger/core/runner.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ranger/core/runner.py b/ranger/core/runner.py index d465f070..0a3aa171 100644 --- a/ranger/core/runner.py +++ b/ranger/core/runner.py @@ -190,6 +190,8 @@ class Runner(object): # pylint: disable=too-few-public-methods pipe_output = True context.wait = False if 's' in context.flags: + # Using a with-statement for these is inconvenient. + # pylint: disable=consider-using-with devnull_writable = open(os.devnull, 'w') devnull_readable = open(os.devnull, 'r') for key in ('stdout', 'stderr'): @@ -240,6 +242,7 @@ class Runner(object): # pylint: disable=too-few-public-methods if 'f' in context.flags and 'r' not in context.flags: # This can fail and return False if os.fork() is not # supported, but we assume it is, since curses is used. + # pylint: disable=consider-using-with Popen_forked(**popen_kws) else: process = Popen(**popen_kws) |