koleo-cli 0.2.137.14__tar.gz → 0.2.137.16__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 (22) hide show
  1. koleo_cli-0.2.137.16/MANIFEST.in +1 -0
  2. {koleo_cli-0.2.137.14/koleo_cli.egg-info → koleo_cli-0.2.137.16}/PKG-INFO +3 -3
  3. {koleo_cli-0.2.137.14 → koleo_cli-0.2.137.16}/koleo/cli.py +13 -13
  4. {koleo_cli-0.2.137.14 → koleo_cli-0.2.137.16}/koleo/utils.py +2 -2
  5. {koleo_cli-0.2.137.14 → koleo_cli-0.2.137.16/koleo_cli.egg-info}/PKG-INFO +3 -3
  6. {koleo_cli-0.2.137.14 → koleo_cli-0.2.137.16}/koleo_cli.egg-info/SOURCES.txt +2 -0
  7. koleo_cli-0.2.137.16/koleo_cli.egg-info/requires.txt +2 -0
  8. {koleo_cli-0.2.137.14 → koleo_cli-0.2.137.16}/pyproject.toml +1 -1
  9. koleo_cli-0.2.137.16/requirements.txt +2 -0
  10. {koleo_cli-0.2.137.14 → koleo_cli-0.2.137.16}/setup.py +1 -1
  11. koleo_cli-0.2.137.14/koleo_cli.egg-info/requires.txt +0 -2
  12. {koleo_cli-0.2.137.14 → koleo_cli-0.2.137.16}/LICENSE +0 -0
  13. {koleo_cli-0.2.137.14 → koleo_cli-0.2.137.16}/README.md +0 -0
  14. {koleo_cli-0.2.137.14 → koleo_cli-0.2.137.16}/koleo/__init__.py +0 -0
  15. {koleo_cli-0.2.137.14 → koleo_cli-0.2.137.16}/koleo/__main__.py +0 -0
  16. {koleo_cli-0.2.137.14 → koleo_cli-0.2.137.16}/koleo/api.py +0 -0
  17. {koleo_cli-0.2.137.14 → koleo_cli-0.2.137.16}/koleo/storage.py +0 -0
  18. {koleo_cli-0.2.137.14 → koleo_cli-0.2.137.16}/koleo/types.py +0 -0
  19. {koleo_cli-0.2.137.14 → koleo_cli-0.2.137.16}/koleo_cli.egg-info/dependency_links.txt +0 -0
  20. {koleo_cli-0.2.137.14 → koleo_cli-0.2.137.16}/koleo_cli.egg-info/entry_points.txt +0 -0
  21. {koleo_cli-0.2.137.14 → koleo_cli-0.2.137.16}/koleo_cli.egg-info/top_level.txt +0 -0
  22. {koleo_cli-0.2.137.14 → koleo_cli-0.2.137.16}/setup.cfg +0 -0
@@ -0,0 +1 @@
1
+ include requirements.txt
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: koleo-cli
3
- Version: 0.2.137.14
3
+ Version: 0.2.137.16
4
4
  Summary: Koleo CLI
5
5
  Home-page: https://github.com/lzgirlcat/koleo-cli
6
6
  Author: Zoey !
@@ -14,8 +14,8 @@ Classifier: Operating System :: OS Independent
14
14
  Requires-Python: >=3.12
15
15
  Description-Content-Type: text/markdown
16
16
  License-File: LICENSE
17
- Requires-Dist: rich==13.7.1
18
- Requires-Dist: requests==2.31.0
17
+ Requires-Dist: rich~=13.7
18
+ Requires-Dist: requests~=2.32
19
19
 
20
20
  # Koleo CLI
21
21
  [![PyPI - Version](https://img.shields.io/pypi/v/koleo-cli.svg)](https://pypi.org/project/koleo-cli)
@@ -224,14 +224,7 @@ class CLI:
224
224
  self.print(self.train_route_table(train_details))
225
225
 
226
226
  def connections(
227
- self,
228
- start: str,
229
- end: str,
230
- date: datetime,
231
- brands: list[str],
232
- direct: bool,
233
- purchasable: bool,
234
- length: int = 1
227
+ self, start: str, end: str, date: datetime, brands: list[str], direct: bool, purchasable: bool, length: int = 1
235
228
  ):
236
229
  start_station = self.get_station(start)
237
230
  end_station = self.get_station(end)
@@ -241,7 +234,7 @@ class CLI:
241
234
  connection_brands = {i["name"]: i["id"] for i in api_brands}
242
235
  else:
243
236
  connection_brands = {
244
- i["name"]:i["id"]
237
+ i["name"]: i["id"]
245
238
  for i in api_brands
246
239
  if i["name"].lower().strip() in brands or i["logo_text"].lower().strip() in brands
247
240
  }
@@ -252,17 +245,22 @@ class CLI:
252
245
  fetch_date = date
253
246
  while len(results) < length:
254
247
  connections = self.client.get_connections(
255
- start_station["name_slug"], end_station["name_slug"], list(connection_brands.values()), fetch_date, direct, purchasable
248
+ start_station["name_slug"],
249
+ end_station["name_slug"],
250
+ list(connection_brands.values()),
251
+ fetch_date,
252
+ direct,
253
+ purchasable,
256
254
  )
257
255
  if connections:
258
- fetch_date = arr_dep_to_dt(connections[-1]["departure"]) + timedelta(seconds=(30*60)+1) # wtf
256
+ fetch_date = arr_dep_to_dt(connections[-1]["departure"]) + timedelta(seconds=(30 * 60) + 1) # wtf
259
257
  results.extend(connections)
260
258
  else:
261
259
  break
262
260
  link = (
263
261
  f"https://koleo.pl/rozklad-pkp/{start_station["name_slug"]}/{end_station["name_slug"]}"
264
262
  + f"/{date.strftime("%d-%m-%Y_%H:%M")}"
265
- +f"{"all" if not direct else "direct"}/{"-".join(connection_brands.keys()) if brands else "all"}"
263
+ + f"{"all" if not direct else "direct"}/{"-".join(connection_brands.keys()) if brands else "all"}"
266
264
  )
267
265
  parts = [
268
266
  f"[bold blue][link={link}]{start_station["name"]} → {end_station["name"]} at {date.strftime("%H:%M %d-%m")}[/link][/bold blue]"
@@ -524,7 +522,9 @@ def main():
524
522
  type=int,
525
523
  default=1,
526
524
  )
527
- connections.set_defaults(func=cli.connections, pass_=["start", "end", "brands", "date", "direct", "purchasable", "length"])
525
+ connections.set_defaults(
526
+ func=cli.connections, pass_=["start", "end", "brands", "date", "direct", "purchasable", "length"]
527
+ )
528
528
 
529
529
  args = parser.parse_args()
530
530
 
@@ -69,8 +69,8 @@ NUMERAL_TO_ARABIC = {
69
69
  }
70
70
 
71
71
 
72
- def convert_platform_number(number: str) -> int | None | str:
73
- if number[-1] in "abcdefghi": # just to be safe...
72
+ def convert_platform_number(number: str | None) -> int | None | str:
73
+ if number and number[-1] in "abcdefghi": # just to be safe...
74
74
  arabic = NUMERAL_TO_ARABIC.get(number[:-1])
75
75
  return f"{arabic}{number[-1]}" if arabic else None
76
76
  return NUMERAL_TO_ARABIC.get(number)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: koleo-cli
3
- Version: 0.2.137.14
3
+ Version: 0.2.137.16
4
4
  Summary: Koleo CLI
5
5
  Home-page: https://github.com/lzgirlcat/koleo-cli
6
6
  Author: Zoey !
@@ -14,8 +14,8 @@ Classifier: Operating System :: OS Independent
14
14
  Requires-Python: >=3.12
15
15
  Description-Content-Type: text/markdown
16
16
  License-File: LICENSE
17
- Requires-Dist: rich==13.7.1
18
- Requires-Dist: requests==2.31.0
17
+ Requires-Dist: rich~=13.7
18
+ Requires-Dist: requests~=2.32
19
19
 
20
20
  # Koleo CLI
21
21
  [![PyPI - Version](https://img.shields.io/pypi/v/koleo-cli.svg)](https://pypi.org/project/koleo-cli)
@@ -1,6 +1,8 @@
1
1
  LICENSE
2
+ MANIFEST.in
2
3
  README.md
3
4
  pyproject.toml
5
+ requirements.txt
4
6
  setup.py
5
7
  koleo/__init__.py
6
8
  koleo/__main__.py
@@ -0,0 +1,2 @@
1
+ rich~=13.7
2
+ requests~=2.32
@@ -1,5 +1,5 @@
1
1
  [build-system]
2
- requires = ["wheel", "setuptools>=61.0"]
2
+ requires = ["setuptools>=61.0"]
3
3
  build-backend = "setuptools.build_meta"
4
4
 
5
5
  [tool.ruff]
@@ -0,0 +1,2 @@
1
+ rich~=13.7
2
+ requests~=2.32
@@ -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.14",
17
+ version="0.2.137.16",
18
18
  description="Koleo CLI",
19
19
  long_description=long_description(),
20
20
  long_description_content_type="text/markdown",
@@ -1,2 +0,0 @@
1
- rich==13.7.1
2
- requests==2.31.0
File without changes
File without changes
File without changes