Skip to content

Commit

Permalink
Use older type annotation syntax.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
acolomb committed Apr 28, 2024
1 parent 3291110 commit b55ce5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion canopen/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class Listener:
class Network(MutableMapping):
"""Representation of one CAN bus containing one or more nodes."""

def __init__(self, bus: can.BusABC | None = None):
def __init__(self, bus: Optional[can.BusABC] = None):
"""
:param can.BusABC bus:
A python-can bus instance to re-use.
Expand Down

0 comments on commit b55ce5c

Please sign in to comment.