Skip to content

Commit b55ce5c

Browse files
committed
Use older type annotation syntax.
Python 3.10 added the | operator for typing hint alternatives. Since this is the only place where that new syntax is used, revert it to use the Optional type and restore compatibility with Python < 3.10.
1 parent 3291110 commit b55ce5c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

canopen/network.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class Listener:
3333
class Network(MutableMapping):
3434
"""Representation of one CAN bus containing one or more nodes."""
3535

36-
def __init__(self, bus: can.BusABC | None = None):
36+
def __init__(self, bus: Optional[can.BusABC] = None):
3737
"""
3838
:param can.BusABC bus:
3939
A python-can bus instance to re-use.

0 commit comments

Comments
 (0)