arccos-api 0.3.0__tar.gz → 0.3.1__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.
Files changed (37) hide show
  1. {arccos_api-0.3.0/arccos_api.egg-info → arccos_api-0.3.1}/PKG-INFO +1 -1
  2. {arccos_api-0.3.0 → arccos_api-0.3.1}/arccos/cli/stats.py +1 -1
  3. {arccos_api-0.3.0 → arccos_api-0.3.1}/arccos/exceptions.py +1 -1
  4. {arccos_api-0.3.0 → arccos_api-0.3.1}/arccos/resources/courses.py +1 -1
  5. {arccos_api-0.3.0 → arccos_api-0.3.1}/arccos/resources/rounds.py +6 -2
  6. {arccos_api-0.3.0 → arccos_api-0.3.1/arccos_api.egg-info}/PKG-INFO +1 -1
  7. {arccos_api-0.3.0 → arccos_api-0.3.1}/pyproject.toml +1 -1
  8. {arccos_api-0.3.0 → arccos_api-0.3.1}/MANIFEST.in +0 -0
  9. {arccos_api-0.3.0 → arccos_api-0.3.1}/README.md +0 -0
  10. {arccos_api-0.3.0 → arccos_api-0.3.1}/arccos/__init__.py +0 -0
  11. {arccos_api-0.3.0 → arccos_api-0.3.1}/arccos/__main__.py +0 -0
  12. {arccos_api-0.3.0 → arccos_api-0.3.1}/arccos/_http.py +0 -0
  13. {arccos_api-0.3.0 → arccos_api-0.3.1}/arccos/auth.py +0 -0
  14. {arccos_api-0.3.0 → arccos_api-0.3.1}/arccos/cli/__init__.py +0 -0
  15. {arccos_api-0.3.0 → arccos_api-0.3.1}/arccos/cli/_helpers.py +0 -0
  16. {arccos_api-0.3.0 → arccos_api-0.3.1}/arccos/cli/auth.py +0 -0
  17. {arccos_api-0.3.0 → arccos_api-0.3.1}/arccos/cli/rounds.py +0 -0
  18. {arccos_api-0.3.0 → arccos_api-0.3.1}/arccos/client.py +0 -0
  19. {arccos_api-0.3.0 → arccos_api-0.3.1}/arccos/resources/__init__.py +0 -0
  20. {arccos_api-0.3.0 → arccos_api-0.3.1}/arccos/resources/clubs.py +0 -0
  21. {arccos_api-0.3.0 → arccos_api-0.3.1}/arccos/resources/handicap.py +0 -0
  22. {arccos_api-0.3.0 → arccos_api-0.3.1}/arccos/resources/stats.py +0 -0
  23. {arccos_api-0.3.0 → arccos_api-0.3.1}/arccos/types.py +0 -0
  24. {arccos_api-0.3.0 → arccos_api-0.3.1}/arccos_api.egg-info/SOURCES.txt +0 -0
  25. {arccos_api-0.3.0 → arccos_api-0.3.1}/arccos_api.egg-info/dependency_links.txt +0 -0
  26. {arccos_api-0.3.0 → arccos_api-0.3.1}/arccos_api.egg-info/entry_points.txt +0 -0
  27. {arccos_api-0.3.0 → arccos_api-0.3.1}/arccos_api.egg-info/requires.txt +0 -0
  28. {arccos_api-0.3.0 → arccos_api-0.3.1}/arccos_api.egg-info/top_level.txt +0 -0
  29. {arccos_api-0.3.0 → arccos_api-0.3.1}/setup.cfg +0 -0
  30. {arccos_api-0.3.0 → arccos_api-0.3.1}/tests/test_auth.py +0 -0
  31. {arccos_api-0.3.0 → arccos_api-0.3.1}/tests/test_cli.py +0 -0
  32. {arccos_api-0.3.0 → arccos_api-0.3.1}/tests/test_client.py +0 -0
  33. {arccos_api-0.3.0 → arccos_api-0.3.1}/tests/test_exceptions.py +0 -0
  34. {arccos_api-0.3.0 → arccos_api-0.3.1}/tests/test_http.py +0 -0
  35. {arccos_api-0.3.0 → arccos_api-0.3.1}/tests/test_resources.py +0 -0
  36. {arccos_api-0.3.0 → arccos_api-0.3.1}/tests/test_rounds.py +0 -0
  37. {arccos_api-0.3.0 → arccos_api-0.3.1}/tests/test_security.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: arccos-api
3
- Version: 0.3.0
3
+ Version: 0.3.1
4
4
  Summary: Unofficial Python CLI and client library for the Arccos Golf API
5
5
  Author: Paul Frederiksen
6
6
  License: MIT
@@ -551,7 +551,7 @@ def club_shots(club_id: int, limit: int, as_json: bool):
551
551
  # Try to resolve club name
552
552
  try:
553
553
  bag = client.clubs.bag(str(bag_id))
554
- bag_club = next(
554
+ bag_club: dict = next(
555
555
  (c for c in bag.get("clubs", []) if c["clubId"] == club_id), {}
556
556
  )
557
557
  club_type = bag_club.get("clubType", club_id)
@@ -6,7 +6,7 @@ Custom exceptions for the Arccos API client.
6
6
  class ArccosError(Exception):
7
7
  """Base exception for all Arccos API errors."""
8
8
 
9
- def __init__(self, message: str, status_code: int = None, error_code: int = None):
9
+ def __init__(self, message: str, status_code: int | None = None, error_code: int | None = None):
10
10
  super().__init__(message)
11
11
  self.status_code = status_code
12
12
  self.error_code = error_code
@@ -24,7 +24,7 @@ class CoursesResource:
24
24
  print(course["courseName"])
25
25
  """
26
26
 
27
- def __init__(self, http: HttpClient, user_id: str = None):
27
+ def __init__(self, http: HttpClient, user_id: str | None = None):
28
28
  self._http = http
29
29
  self._user_id = user_id
30
30
 
@@ -6,11 +6,15 @@ Endpoint prefix: /users/{userId}/rounds
6
6
 
7
7
  from __future__ import annotations
8
8
 
9
+ import builtins
9
10
  from collections.abc import Iterator
10
11
  from datetime import datetime
11
12
 
12
13
  from .._http import HttpClient
13
14
 
15
+ # Alias to avoid shadowing by the RoundsResource.list method
16
+ _list = builtins.list
17
+
14
18
 
15
19
  class RoundsResource:
16
20
  """
@@ -127,7 +131,7 @@ class RoundsResource:
127
131
  """
128
132
  return self._http.get(f"/users/{self._user_id}/rounds/{round_id}")
129
133
 
130
- def holes(self, round_id: int | str) -> list[dict]:
134
+ def holes(self, round_id: int | str) -> _list[dict]:
131
135
  """
132
136
  Fetch hole-by-hole data for a round.
133
137
 
@@ -143,7 +147,7 @@ class RoundsResource:
143
147
  # Analysis helpers
144
148
  # ------------------------------------------------------------------
145
149
 
146
- def pace_of_play(self, rounds: list[dict] = None) -> dict:
150
+ def pace_of_play(self, rounds: _list[dict] | None = None) -> dict:
147
151
  """
148
152
  Compute pace of play (round duration) per course.
149
153
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: arccos-api
3
- Version: 0.3.0
3
+ Version: 0.3.1
4
4
  Summary: Unofficial Python CLI and client library for the Arccos Golf API
5
5
  Author: Paul Frederiksen
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "arccos-api"
7
- version = "0.3.0"
7
+ version = "0.3.1"
8
8
  description = "Unofficial Python CLI and client library for the Arccos Golf API"
9
9
  readme = "README.md"
10
10
  license = {text = "MIT"}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes