diff --git a/cocluto/netmap.py b/cocluto/netmap.py index bfb4559..6326e41 100644 --- a/cocluto/netmap.py +++ b/cocluto/netmap.py @@ -73,7 +73,7 @@ class Port(object): """ name: PortName # the unique id of the port within the machine's ports, eg 'oob', 'p48' machine: Machine # the id of the machine this network port belongs to, eg 'r640b' - bandwidth: optional[float] # the maximum bandwidth of the port in bits per second + bandwidth: float | None # the maximum bandwidth of the port in bits per second net_config: 'NetConfig' def __init__(self, name: PortName, machine: Machine, net_config: 'NetConfig'): @@ -93,7 +93,7 @@ class Port(object): machine_name = port_as_str[0:-(len(port_name) + 1)] return machine_name, port_name - def get_bandwidth(self) -> optional[float]: + def get_bandwidth(self) -> float | None: assert self.bandwidth is not None, f'failed to get the bandwith of {self}' return self.bandwidth diff --git a/cocluto/version.py b/cocluto/version.py index 46b981e..c9f8622 100644 --- a/cocluto/version.py +++ b/cocluto/version.py @@ -1,4 +1,4 @@ -__version__ = '1.0.4' +__version__ = '1.0.41' class Version(object):