Skip to content

Commit

Permalink
Add NodeID docstring.
Browse files Browse the repository at this point in the history
  • Loading branch information
Poikilos committed Jan 7, 2025
1 parent 7abb06e commit eba45cd
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion openlcb/nodeid.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
class NodeID:
"""Convert an integer, list, NodeID or string to a NodeID
"""A 6-byte (48-bit) Node ID.
The constructor is manually overloaded as follows:
- nodeId (int): If int.
- nodeId (str): If str. Six dot-separated hex pairs.
- nodeId (NodeID): If NodeID. data.nodeID is used in this case.
- nodeId (list[int]): If list. Six ints.
Args:
nodeId (Union[int,str,NodeID,list[int]]): Node ID in int, hex
string, NodeID, or list[int] form.
"""
def __str__(self):
'''Display in standard format'''
Expand Down

0 comments on commit eba45cd

Please sign in to comment.