Skip to content

Commit

Permalink
Annotate lss.LssMaster.network and avoid None dummy value.
Browse files Browse the repository at this point in the history
Use a _DummyNetwork object instead.
  • Loading branch information
acolomb committed Aug 11, 2024
1 parent d6c7ee0 commit d2952f5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions canopen/lss.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
import struct
import queue

import canopen.network


logger = logging.getLogger(__name__)

# Command Specifier (CS)
Expand Down Expand Up @@ -78,8 +81,8 @@ class LssMaster:
#: Max time in seconds to wait for response from server
RESPONSE_TIMEOUT = 0.5

def __init__(self):
self.network = None
def __init__(self) -> None:
self.network: canopen.network.Network = canopen.network._DummyNetwork()
self._node_id = 0
self._data = None
self.responses = queue.Queue()
Expand Down

0 comments on commit d2952f5

Please sign in to comment.