Optional[int | float]
is not a valid type annotation. I've changed it to just float
because an int
should be viewed as a subclass of float
for typing purposes. But even if you wanted to express the union, the correct syntax would have been Optional[Union[int, float]]
, or the equivalent Union[int, float, None]
.
The only reason I touched this code at all is that the regular python interpreter throws an exception when trying to evaluate this annotation as part of running the simulator.
Salmiakki multiplayer worm game
rahix (ccfd84a7) at 30 Dec 11:19
rahix (73c7168b) at 30 Dec 10:44
Hi,
you need to bump the version number when you want your latest changes to become available on the app store. I've done it for you in this merge request :)
rahix (73c7168b) at 30 Dec 08:09
Bump version
rahix (0115edda) at 15 Dec 14:05
Bump version
because ICE wifi is as reliable as ICE timetables:
{'bapInstalled': True, 'trainType': 'ICE', 'serverTime': 1694160018762, 'internet': 'HIGH', 'serviceLevel': 'AVAILABLE_SERVICE', 'wagonClass': 'FIRST', 'gpsStatus': 'VALID', 'tileY': -191, 'series': '412', 'tileX': 132, 'longitude': 11.4559, 'speed': 199.0, 'latitude': 48.28808, 'tzn': 'ICE9012', 'connection': True, 'connectivity': {'remainingTimeSeconds': 600, 'nextState': 'HIGH', 'currentState': 'UNSTABLE'}}
{'bapInstalled': True, 'trainType': 'ICE', 'serverTime': 1694160019412, 'internet': 'HIGH', 'serviceLevel': 'AVAILABLE_SERVICE', 'wagonClass': 'FIRST', 'gpsStatus': 'VALID', 'tileY': -191, 'series': '412', 'tileX': 132, 'longitude': 11.4559, 'speed': 199.0, 'latitude': 48.28808, 'tzn': 'ICE9012', 'connection': True, 'connectivity': {'remainingTimeSeconds': 600, 'nextState': 'HIGH', 'currentState': 'UNSTABLE'}}
{'bapInstalled': True, 'trainType': 'ICE', 'serverTime': 1694160020096, 'internet': 'HIGH', 'serviceLevel': 'AVAILABLE_SERVICE', 'wagonClass': 'FIRST', 'gpsStatus': 'VALID', 'tileY': -191, 'series': '412', 'tileX'
: 132, 'longitude': 11.4559, 'speed': 199.0, 'latitude': 48.28808, 'tzn': 'ICE9012', 'connection': True, 'connectivity': {'remainingTimeSeconds': 600, 'nextState': 'HIGH', 'currentState': 'UNSTABLE'}}
{'bapInstalled': True, 'trainType': 'ICE', 'serverTime': 1694160020872, 'internet': 'HIGH', 'serviceLevel': 'AVAILABLE_SERVICE', 'wagonClass': 'FIRST', 'gpsStatus': 'VALID', 'tileY': -191, 'series': '412', 'tileX'
: 132, 'longitude': 11.4559, 'speed': 199.0, 'latitude': 48.28808, 'tzn': 'ICE9012', 'connection': True, 'connectivity': {'remainingTimeSeconds': 600, 'nextState': 'HIGH', 'currentState': 'UNSTABLE'}}
{'bapInstalled': True, 'trainType': 'ICE', 'serverTime': 1694160021423, 'internet': 'HIGH', 'serviceLevel': 'AVAILABLE_SERVICE', 'wagonClass': 'FIRST', 'gpsStatus': 'VALID', 'tileY': -191, 'series': '412', 'tileX'
: 132, 'longitude': 11.4559, 'speed': 199.0, 'latitude': 48.28808, 'tzn': 'ICE9012', 'connection': True, 'connectivity': {'remainingTimeSeconds': 600, 'nextState': 'HIGH', 'currentState': 'UNSTABLE'}}
{'bapInstalled': True, 'trainType': 'ICE', 'serverTime': 1694160021965, 'internet': 'HIGH', 'serviceLevel': 'AVAILABLE_SERVICE', 'wagonClass': 'FIRST', 'gpsStatus': 'VALID', 'tileY': -191, 'series': '412', 'tileX'
: 132, 'longitude': 11.4559, 'speed': 199.0, 'latitude': 48.28808, 'tzn': 'ICE9012', 'connection': True, 'connectivity': {'remainingTimeSeconds': 600, 'nextState': 'HIGH', 'currentState': 'UNSTABLE'}}
{'bapInstalled': True, 'trainType': 'ICE', 'serverTime': 1694160022610, 'internet': 'HIGH', 'serviceLevel': 'AVAILABLE_SERVICE', 'wagonClass': 'FIRST', 'gpsStatus': 'VALID', 'tileY': -191, 'series': '412', 'tileX'
: 132, 'longitude': 11.4559, 'speed': 199.0, 'latitude': 48.28808, 'tzn': 'ICE9012', 'connection': True, 'connectivity': {'remainingTimeSeconds': 600, 'nextState': 'HIGH', 'currentState': 'UNSTABLE'}}
Traceback (most recent call last):
File "/flash/sys/main.py", line 3, in <module>
File "/flash/sys/st3m/run.py", line 195, in run_main
File "/flash/sys/st3m/run.py", line 131, in run_view
File "/flash/sys/st3m/reactor.py", line 114, in run
File "/flash/sys/st3m/reactor.py", line 120, in _run_once
File "/flash/sys/st3m/reactor.py", line 145, in _run_top
File "/flash/sys/st3m/processors.py", line 58, in think
File "/flash/sys/st3m/ui/elements/overlays.py", line 83, in think
File "/flash/sys/st3m/ui/view.py", line 179, in think
File "/flash/sys/apps/rahix-FLOW3RonICE/__init__.py", line 148, in think
File "urequests.py", line 180, in get
File "urequests.py", line 93, in request
OSError: [Errno 113] ECONNABORTED
Closes #3
{'bapInstalled': True, 'trainType': 'ICE', 'serverTime': 1694161123457, 'internet': 'HIGH', 'serviceLevel': 'AVAILABLE_SERVICE', 'wagonClass': 'FIRST', 'gpsStatus': 'VALID', 'tileY': -149, 'series': '412', 'tileX'
: 133, 'longitude': 11.4641, 'speed': 155.0, 'latitude': 48.66442, 'tzn': 'ICE9012', 'connection': True, 'connectivity': {'remainingTimeSeconds': 1200, 'nextState': 'UNSTABLE', 'currentState': 'HIGH'}}
Error while fetching iceportal status: [Errno 113] ECONNABORTED
Connected!
Got token: [redacted]
Logged in!
{'bapInstalled': True, 'trainType': 'ICE', 'serverTime': 1694161141005, 'internet': 'HIGH', 'serviceLevel': 'AVAILABLE_SERVICE', 'wagonClass': 'FIRST', 'gpsStatus': 'VALID', 'tileY': -148, 'series': '412', 'tileX'
: 132, 'longitude': 11.46049, 'speed': 154.0, 'latitude': 48.67048, 'tzn': 'ICE9012', 'connection': True, 'connectivity': {'remainingTimeSeconds': 1200, 'nextState': 'UNSTABLE', 'currentState': 'HIGH'}}
rahix (e11fc73f) at 15 Dec 14:04
Merge branch 'add-better-error-handling' into 'main'
... and 1 more commit
My agreement with relicensing to CERN Open Source Hardware License v2 S is hereby officially expressed