From b55ce5cac8d645ecb14b622323ae6136e561966c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Colomb?= Date: Fri, 26 Apr 2024 09:55:04 +0200 Subject: [PATCH] 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. --- canopen/network.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/canopen/network.py b/canopen/network.py index 4fcb13ec..a1993b17 100644 --- a/canopen/network.py +++ b/canopen/network.py @@ -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.