Skip to content

Commit 99a1a8a

Browse files
Copilotbittner
andcommitted
Remove redundant _old_handlers initialization from __init__ methods
Co-authored-by: bittner <[email protected]>
1 parent 31ae369 commit 99a1a8a

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

cli_test_helpers/decorators.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ class ArgvContext(LoggingIsolationMixin):
4848
def __init__(self, *new_args):
4949
self._old = sys.argv
5050
self.args = type(self._old)(new_args)
51-
self._old_handlers = None
5251

5352
def __enter__(self):
5453
self._save_logging_handlers()
@@ -78,7 +77,6 @@ def __init__(self, **kwargs):
7877
kwargs.pop(key)
7978

8079
super().__init__("os.environ", **kwargs)
81-
self._old_handlers = None
8280

8381
def __enter__(self):
8482
self._save_logging_handlers()
@@ -110,7 +108,6 @@ class RandomDirectoryContext(LoggingIsolationMixin, TemporaryDirectory):
110108

111109
def __init__(self, *args, **kwargs):
112110
super().__init__(*args, **kwargs)
113-
self._old_handlers = None
114111

115112
def __enter__(self):
116113
"""Create a temporary directory and ``cd`` into it."""

0 commit comments

Comments
 (0)