[elbe-devel] [PATCH 06/10] elbepack: rpcaptcache: ignore assignments to readonly variable from mypy

Thomas Weißschuh thomas.weissschuh at linutronix.de
Mon Aug 12 14:19:27 CEST 2024


Mypy rejects assignments to sys.__stdout__ and sys.__stderr__.
As these assignments technically work and I'm not sure if they are
actually needed, ignore the errors.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
 elbepack/rpcaptcache.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/elbepack/rpcaptcache.py b/elbepack/rpcaptcache.py
index 3624f6c05d3e..f6b5b0ab306d 100644
--- a/elbepack/rpcaptcache.py
+++ b/elbepack/rpcaptcache.py
@@ -45,8 +45,8 @@ class MyMan(BaseManager):
         # for non binary mode ..
         sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 1)
         sys.stderr = os.fdopen(sys.stderr.fileno(), 'w', 1)
-        sys.__stdout__ = sys.stdout
-        sys.__stderr__ = sys.stderr
+        sys.__stdout__ = sys.stdout  # type: ignore
+        sys.__stderr__ = sys.stderr  # type: ignore
 
     def start(self):
         """Redirect outputs of the process to an async logging thread"""

-- 
2.46.0



More information about the elbe-devel mailing list