Removing unnecessary initialization of self.stream in TCPInterface

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

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

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