koleo-cli 0.2.137.23.2__tar.gz → 0.2.137.23.3__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.2/koleo_cli.egg-info → koleo_cli-0.2.137.23.3}/PKG-INFO +1 -1
  2. {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo/args.py +2 -3
  3. {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo/cli/__init__.py +0 -1
  4. {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo/cli/base.py +7 -3
  5. {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo/utils.py +2 -1
  6. {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3/koleo_cli.egg-info}/PKG-INFO +1 -1
  7. {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/setup.py +1 -1
  8. {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/LICENSE +0 -0
  9. {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/MANIFEST.in +0 -0
  10. {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/README.md +0 -0
  11. {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo/__init__.py +0 -0
  12. {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo/__main__.py +0 -0
  13. {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo/api/__init__.py +0 -0
  14. {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo/api/base.py +0 -0
  15. {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo/api/client.py +0 -0
  16. {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo/api/errors.py +0 -0
  17. {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo/api/logging.py +0 -0
  18. {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo/api/types.py +0 -0
  19. {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo/cli/aliases.py +0 -0
  20. {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo/cli/connections.py +0 -0
  21. {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo/cli/seats.py +0 -0
  22. {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo/cli/station_board.py +0 -0
  23. {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo/cli/stations.py +0 -0
  24. {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo/cli/train_info.py +0 -0
  25. {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo/cli/utils.py +0 -0
  26. {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo/storage.py +0 -0
  27. {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo_cli.egg-info/SOURCES.txt +0 -0
  28. {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo_cli.egg-info/dependency_links.txt +0 -0
  29. {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo_cli.egg-info/entry_points.txt +0 -0
  30. {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo_cli.egg-info/requires.txt +0 -0
  31. {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/koleo_cli.egg-info/top_level.txt +0 -0
  32. {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/pyproject.toml +0 -0
  33. {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/requirements.txt +0 -0
  34. {koleo_cli-0.2.137.23.2 → koleo_cli-0.2.137.23.3}/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.2
3
+ Version: 0.2.137.23.3
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, create_task, CancelledError
2
+ from asyncio import run
3
3
  from datetime import datetime
4
4
  from inspect import isawaitable
5
5
 
@@ -287,8 +287,7 @@ def main():
287
287
  await client.close()
288
288
 
289
289
  cli.client, cli.storage = client, storage
290
- cli.console.no_color = args.nocolor
291
- cli.no_color = args.nocolor
290
+ cli.init_console(args.nocolor)
292
291
  if hasattr(args, "station") and args.station is None:
293
292
  args.station = storage.favourite_station
294
293
  elif hasattr(args, "station") and getattr(args, "save", False):
@@ -3,7 +3,6 @@ from .connections import Connections
3
3
  from .seats import Seats
4
4
  from .station_board import StationBoard
5
5
  from .stations import Stations
6
- from .train_info import TrainInfo
7
6
 
8
7
 
9
8
  class CLI(Aliases, StationBoard, Connections, Seats, Stations): ...
@@ -1,7 +1,5 @@
1
1
  import re
2
2
 
3
- from rich.console import Console
4
-
5
3
  from koleo.api import KoleoAPI
6
4
  from koleo.api.types import ExtendedStationInfo, TrainOnStationInfo, TrainStop
7
5
  from koleo.storage import Storage
@@ -18,7 +16,13 @@ class BaseCli:
18
16
  self._client = client
19
17
  self._storage = storage
20
18
  self.no_color = no_color
21
- self.console = Console(color_system="standard", no_color=no_color, highlight=False)
19
+
20
+ def init_console(self, no_color: bool | None = None):
21
+ if no_color is not None:
22
+ self.no_color = no_color
23
+ if not self.no_color:
24
+ from rich.console import Console
25
+ self.console = Console(color_system="standard", highlight=False)
22
26
 
23
27
  def print(self, text: str, *args, **kwargs):
24
28
  if not text.strip():
@@ -1,7 +1,7 @@
1
1
  from argparse import Action
2
2
  from datetime import datetime, time, timedelta
3
3
 
4
- from .api.types import CarriageType, SeatsAvailabilityResponse, TimeDict, TrainComposition
4
+ from .api.types import SeatsAvailabilityResponse, TimeDict, TrainComposition
5
5
 
6
6
 
7
7
  def parse_datetime(s: str):
@@ -69,6 +69,7 @@ TRANSLITERATIONS = {
69
69
  "ź": "z",
70
70
  "ż": "z",
71
71
  " ": "-",
72
+ "/": "-",
72
73
  "_": "-",
73
74
  }
74
75
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: koleo-cli
3
- Version: 0.2.137.23.2
3
+ Version: 0.2.137.23.3
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.2",
17
+ version="0.2.137.23.3",
18
18
  description="Koleo CLI",
19
19
  long_description=long_description(),
20
20
  long_description_content_type="text/markdown",