koleo-cli 0.2.137.23__tar.gz → 0.2.137.23.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of koleo-cli might be problematic. Click here for more details.

Files changed (34) hide show
  1. {koleo_cli-0.2.137.23/koleo_cli.egg-info → koleo_cli-0.2.137.23.2}/PKG-INFO +1 -1
  2. {koleo_cli-0.2.137.23 → koleo_cli-0.2.137.23.2}/koleo/args.py +5 -2
  3. {koleo_cli-0.2.137.23 → koleo_cli-0.2.137.23.2}/koleo/cli/connections.py +1 -1
  4. {koleo_cli-0.2.137.23 → koleo_cli-0.2.137.23.2}/koleo/cli/train_info.py +1 -1
  5. {koleo_cli-0.2.137.23 → koleo_cli-0.2.137.23.2}/koleo/storage.py +1 -1
  6. {koleo_cli-0.2.137.23 → koleo_cli-0.2.137.23.2/koleo_cli.egg-info}/PKG-INFO +1 -1
  7. {koleo_cli-0.2.137.23 → koleo_cli-0.2.137.23.2}/setup.py +1 -1
  8. {koleo_cli-0.2.137.23 → koleo_cli-0.2.137.23.2}/LICENSE +0 -0
  9. {koleo_cli-0.2.137.23 → koleo_cli-0.2.137.23.2}/MANIFEST.in +0 -0
  10. {koleo_cli-0.2.137.23 → koleo_cli-0.2.137.23.2}/README.md +0 -0
  11. {koleo_cli-0.2.137.23 → koleo_cli-0.2.137.23.2}/koleo/__init__.py +0 -0
  12. {koleo_cli-0.2.137.23 → koleo_cli-0.2.137.23.2}/koleo/__main__.py +0 -0
  13. {koleo_cli-0.2.137.23 → koleo_cli-0.2.137.23.2}/koleo/api/__init__.py +0 -0
  14. {koleo_cli-0.2.137.23 → koleo_cli-0.2.137.23.2}/koleo/api/base.py +0 -0
  15. {koleo_cli-0.2.137.23 → koleo_cli-0.2.137.23.2}/koleo/api/client.py +0 -0
  16. {koleo_cli-0.2.137.23 → koleo_cli-0.2.137.23.2}/koleo/api/errors.py +0 -0
  17. {koleo_cli-0.2.137.23 → koleo_cli-0.2.137.23.2}/koleo/api/logging.py +0 -0
  18. {koleo_cli-0.2.137.23 → koleo_cli-0.2.137.23.2}/koleo/api/types.py +0 -0
  19. {koleo_cli-0.2.137.23 → koleo_cli-0.2.137.23.2}/koleo/cli/__init__.py +0 -0
  20. {koleo_cli-0.2.137.23 → koleo_cli-0.2.137.23.2}/koleo/cli/aliases.py +0 -0
  21. {koleo_cli-0.2.137.23 → koleo_cli-0.2.137.23.2}/koleo/cli/base.py +0 -0
  22. {koleo_cli-0.2.137.23 → koleo_cli-0.2.137.23.2}/koleo/cli/seats.py +0 -0
  23. {koleo_cli-0.2.137.23 → koleo_cli-0.2.137.23.2}/koleo/cli/station_board.py +0 -0
  24. {koleo_cli-0.2.137.23 → koleo_cli-0.2.137.23.2}/koleo/cli/stations.py +0 -0
  25. {koleo_cli-0.2.137.23 → koleo_cli-0.2.137.23.2}/koleo/cli/utils.py +0 -0
  26. {koleo_cli-0.2.137.23 → koleo_cli-0.2.137.23.2}/koleo/utils.py +0 -0
  27. {koleo_cli-0.2.137.23 → koleo_cli-0.2.137.23.2}/koleo_cli.egg-info/SOURCES.txt +0 -0
  28. {koleo_cli-0.2.137.23 → koleo_cli-0.2.137.23.2}/koleo_cli.egg-info/dependency_links.txt +0 -0
  29. {koleo_cli-0.2.137.23 → koleo_cli-0.2.137.23.2}/koleo_cli.egg-info/entry_points.txt +0 -0
  30. {koleo_cli-0.2.137.23 → koleo_cli-0.2.137.23.2}/koleo_cli.egg-info/requires.txt +0 -0
  31. {koleo_cli-0.2.137.23 → koleo_cli-0.2.137.23.2}/koleo_cli.egg-info/top_level.txt +0 -0
  32. {koleo_cli-0.2.137.23 → koleo_cli-0.2.137.23.2}/pyproject.toml +0 -0
  33. {koleo_cli-0.2.137.23 → koleo_cli-0.2.137.23.2}/requirements.txt +0 -0
  34. {koleo_cli-0.2.137.23 → koleo_cli-0.2.137.23.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: koleo-cli
3
- Version: 0.2.137.23
3
+ Version: 0.2.137.23.2
4
4
  Summary: Koleo CLI
5
5
  Home-page: https://github.com/lzgirlcat/koleo-cli
6
6
  Author: Zoey !
@@ -1,5 +1,5 @@
1
1
  from argparse import ArgumentParser
2
- from asyncio import run
2
+ from asyncio import run, create_task, CancelledError
3
3
  from datetime import datetime
4
4
  from inspect import isawaitable
5
5
 
@@ -280,7 +280,10 @@ def main():
280
280
  async def run_view(func, *args, **kwargs):
281
281
  res = func(*args, **kwargs)
282
282
  if isawaitable(res):
283
- await res
283
+ try:
284
+ await res
285
+ except SystemExit:
286
+ ...
284
287
  await client.close()
285
288
 
286
289
  cli.client, cli.storage = client, storage
@@ -76,7 +76,7 @@ class Connections(BaseCli):
76
76
  else:
77
77
  price_str = ""
78
78
  parts.append(
79
- f"[bold green][link=https://koleo.pl/travel-options/{i["id"]}]{date_part}{dep.strftime("%H:%M")} - {arr.strftime("%H:%M")}[/bold green] {travel_time//3600}h{(travel_time % 3600)/60:.0f}m {i['distance']}km{price_str}:[/link]"
79
+ f"[bold green][link=https://koleo.pl/p/{i["id"]}]{date_part}{dep.strftime("%H:%M")} - {arr.strftime("%H:%M")}[/bold green] {travel_time//3600}h{(travel_time % 3600)/60:.0f}m {i['distance']}km{price_str}:[/link]"
80
80
  )
81
81
  if len(i["trains"]) == 1:
82
82
  train = i["trains"][0]
@@ -14,7 +14,7 @@ class TrainInfo(BaseCli):
14
14
  if len(name_parts) == 1 and name_parts[0].isnumeric():
15
15
  number = int(name_parts[0])
16
16
  train_name = ""
17
- elif len(name) > 1:
17
+ elif len(name_parts) > 1:
18
18
  number = int(name_parts.pop(0))
19
19
  train_name = " ".join(name_parts)
20
20
  else:
@@ -91,7 +91,7 @@ class Storage:
91
91
  def load(cls, *, path: str = DEFAULT_CONFIG_PATH, ignore_cache: bool = False) -> t.Self:
92
92
  expanded = ospath.expanduser(path)
93
93
  if ospath.exists(expanded):
94
- with open(expanded) as f:
94
+ with open(expanded, "rb") as f:
95
95
  data = {k: v for k, v in loads(f.read()).items() if k in cls.__dataclass_fields__}
96
96
  else:
97
97
  data = {}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: koleo-cli
3
- Version: 0.2.137.23
3
+ Version: 0.2.137.23.2
4
4
  Summary: Koleo CLI
5
5
  Home-page: https://github.com/lzgirlcat/koleo-cli
6
6
  Author: Zoey !
@@ -14,7 +14,7 @@ def parse_requirements_file(path):
14
14
 
15
15
  setuptools.setup(
16
16
  name="koleo-cli",
17
- version="0.2.137.23",
17
+ version="0.2.137.23.2",
18
18
  description="Koleo CLI",
19
19
  long_description=long_description(),
20
20
  long_description_content_type="text/markdown",
File without changes