-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add mypy support and fixup project to give no errors
* Permissive mypy configuration as starting point * Add minimal type annotations to get no mypy errors * Add runtime test for self.network before using the network * Network.add_node() doesn't accept LocalNode * PeriodicMessageTask.update() don't stop the task unless its running * Variable.desc ensure that the object is int * Variable.read() fail with ValueError unless a valid fmt is used * Variable.write() ensure the description is a string * BaseNode.__init__() fail if no node_id is provided * ObjectDictionary.__getitem__() when splitting "." only return if the object is not an ODVariable * ODRecord.__eq__(), ODArray.__eq__() and ODVariable.__eq__() test type of other before comparing * ODVariable.encode_raw(), .decode_phys(), .encode_phys() add type tests of ensure the input is of correct type * PdoMap various methods: ensure necessary attributes are set
- Loading branch information
Showing
11 changed files
with
204 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.