Removing unnecessary initialization of self.stream in TCPInterface

This commit is contained in:
Travis-L-R committed 2025-11-11 19:19:44 +10:30
1 parent 2245ac8d97
commit 3be73b42e2
2 files changed
+1 -4

No files matched your search

+1 -1
View File
@@ -46,7 +46,7 @@ class StreamInterface(MeshInterface):
raise RuntimeError(
"StreamInterface is now abstract (to update existing code create SerialInterface instead)"
)
self.stream: Optional[serial.Serial] # only serial uses this, TCPInterface overrides the relevant methods instead
self.stream: Optional[serial.Serial] = None # only serial uses this, TCPInterface overrides the relevant methods instead
self._rxBuf = bytes() # empty
self._wantExit = False
-3
View File
@@ -31,9 +31,6 @@ class TCPInterface(StreamInterface):
hostname {string} -- Hostname/IP address of the device to connect to
timeout -- How long to wait for replies (default: 300 seconds)
"""
self.stream = None
self.hostname: str = hostname
self.portNumber: int = portNumber