MouseTools 3.1.0.dev1__tar.gz → 3.1.0.dev2__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 (40) hide show
  1. {mousetools-3.1.0.dev1 → mousetools-3.1.0.dev2/MouseTools.egg-info}/PKG-INFO +2 -1
  2. {mousetools-3.1.0.dev1/MouseTools.egg-info → mousetools-3.1.0.dev2}/PKG-INFO +2 -1
  3. {mousetools-3.1.0.dev1 → mousetools-3.1.0.dev2}/mousetools/__init__.py +1 -1
  4. {mousetools-3.1.0.dev1 → mousetools-3.1.0.dev2}/mousetools/entities/base.py +4 -3
  5. {mousetools-3.1.0.dev1 → mousetools-3.1.0.dev2}/mousetools/entities/menu.py +3 -0
  6. {mousetools-3.1.0.dev1 → mousetools-3.1.0.dev2}/mousetools/entities/restaurant.py +2 -1
  7. {mousetools-3.1.0.dev1 → mousetools-3.1.0.dev2}/mousetools/mixins/disney.py +2 -2
  8. {mousetools-3.1.0.dev1 → mousetools-3.1.0.dev2}/pyproject.toml +62 -34
  9. {mousetools-3.1.0.dev1 → mousetools-3.1.0.dev2}/LICENSE +0 -0
  10. {mousetools-3.1.0.dev1 → mousetools-3.1.0.dev2}/MouseTools.egg-info/SOURCES.txt +0 -0
  11. {mousetools-3.1.0.dev1 → mousetools-3.1.0.dev2}/MouseTools.egg-info/dependency_links.txt +0 -0
  12. {mousetools-3.1.0.dev1 → mousetools-3.1.0.dev2}/MouseTools.egg-info/requires.txt +0 -0
  13. {mousetools-3.1.0.dev1 → mousetools-3.1.0.dev2}/MouseTools.egg-info/top_level.txt +0 -0
  14. {mousetools-3.1.0.dev1 → mousetools-3.1.0.dev2}/README.md +0 -0
  15. {mousetools-3.1.0.dev1 → mousetools-3.1.0.dev2}/mousetools/auth.py +0 -0
  16. {mousetools-3.1.0.dev1 → mousetools-3.1.0.dev2}/mousetools/entities/__init__.py +1 -1
  17. {mousetools-3.1.0.dev1 → mousetools-3.1.0.dev2}/mousetools/entities/attraction.py +0 -0
  18. {mousetools-3.1.0.dev1 → mousetools-3.1.0.dev2}/mousetools/entities/character.py +0 -0
  19. {mousetools-3.1.0.dev1 → mousetools-3.1.0.dev2}/mousetools/entities/destination.py +0 -0
  20. {mousetools-3.1.0.dev1 → mousetools-3.1.0.dev2}/mousetools/entities/dining_event.py +0 -0
  21. {mousetools-3.1.0.dev1 → mousetools-3.1.0.dev2}/mousetools/entities/dinner_show.py +0 -0
  22. {mousetools-3.1.0.dev1 → mousetools-3.1.0.dev2}/mousetools/entities/entertainment.py +0 -0
  23. {mousetools-3.1.0.dev1 → mousetools-3.1.0.dev2}/mousetools/entities/entertainment_venue.py +0 -0
  24. {mousetools-3.1.0.dev1 → mousetools-3.1.0.dev2}/mousetools/entities/event.py +0 -0
  25. {mousetools-3.1.0.dev1 → mousetools-3.1.0.dev2}/mousetools/entities/guest_services.py +0 -0
  26. {mousetools-3.1.0.dev1 → mousetools-3.1.0.dev2}/mousetools/entities/land.py +0 -0
  27. {mousetools-3.1.0.dev1 → mousetools-3.1.0.dev2}/mousetools/entities/merchandise_facility.py +0 -0
  28. {mousetools-3.1.0.dev1 → mousetools-3.1.0.dev2}/mousetools/entities/park.py +0 -0
  29. {mousetools-3.1.0.dev1 → mousetools-3.1.0.dev2}/mousetools/entities/point_of_interest.py +0 -0
  30. {mousetools-3.1.0.dev1 → mousetools-3.1.0.dev2}/mousetools/entities/resort.py +0 -0
  31. {mousetools-3.1.0.dev1 → mousetools-3.1.0.dev2}/mousetools/entities/resort_area.py +0 -0
  32. {mousetools-3.1.0.dev1 → mousetools-3.1.0.dev2}/mousetools/exceptions.py +0 -0
  33. {mousetools-3.1.0.dev1 → mousetools-3.1.0.dev2}/mousetools/ids.py +0 -0
  34. {mousetools-3.1.0.dev1 → mousetools-3.1.0.dev2}/mousetools/mixins/__init__.py +0 -0
  35. {mousetools-3.1.0.dev1 → mousetools-3.1.0.dev2}/mousetools/mixins/themeparksapi.py +0 -0
  36. {mousetools-3.1.0.dev1 → mousetools-3.1.0.dev2}/mousetools/urls.py +0 -0
  37. {mousetools-3.1.0.dev1 → mousetools-3.1.0.dev2}/setup.cfg +0 -0
  38. {mousetools-3.1.0.dev1 → mousetools-3.1.0.dev2}/tests/test_auth.py +0 -0
  39. {mousetools-3.1.0.dev1 → mousetools-3.1.0.dev2}/tests/test_entities.py +1 -1
  40. {mousetools-3.1.0.dev1 → mousetools-3.1.0.dev2}/tests/test_ids.py +0 -0
@@ -1,9 +1,10 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: MouseTools
3
- Version: 3.1.0.dev1
3
+ Version: 3.1.0.dev2
4
4
  Summary: An unofficial Python wrapper for Disney's API
5
5
  Author: Scott Caratozzolo
6
6
  Project-URL: repository, https://gitlab.com/caratozzoloxyz/public/MouseTools
7
+ Project-URL: documentation, https://caratozzoloxyz.gitlab.io/public/MouseTools/
7
8
  Classifier: Programming Language :: Python :: 3
8
9
  Classifier: License :: OSI Approved :: MIT License
9
10
  Classifier: Operating System :: OS Independent
@@ -1,9 +1,10 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: MouseTools
3
- Version: 3.1.0.dev1
3
+ Version: 3.1.0.dev2
4
4
  Summary: An unofficial Python wrapper for Disney's API
5
5
  Author: Scott Caratozzolo
6
6
  Project-URL: repository, https://gitlab.com/caratozzoloxyz/public/MouseTools
7
+ Project-URL: documentation, https://caratozzoloxyz.gitlab.io/public/MouseTools/
7
8
  Classifier: Programming Language :: Python :: 3
8
9
  Classifier: License :: OSI Approved :: MIT License
9
10
  Classifier: Operating System :: OS Independent
@@ -3,5 +3,5 @@ import logging
3
3
  logger = logging.getLogger(__name__)
4
4
  logger.addHandler(logging.NullHandler())
5
5
 
6
- __version__ = "3.1.0-dev.1" # will be set at runtime
6
+ __version__ = "3.1.0-dev.2" # will be set at runtime
7
7
  logger.info(f"MouseTools version: {__version__}")
@@ -106,16 +106,17 @@ class EntityBase(DisneyAPIMixin, ThemeParkAPIMixin):
106
106
  return {
107
107
  "lat": float(
108
108
  self.disney_data["coordinates"]["Guest Entrance"]["gps"][
109
- "lattitude"
109
+ "latitude"
110
110
  ]
111
111
  ),
112
112
  "lng": float(
113
- self.disney_data["coordinates"]["Guest entrance"]["gps"][
113
+ self.disney_data["coordinates"]["Guest Entrance"]["gps"][
114
114
  "longitude"
115
115
  ]
116
116
  ),
117
117
  }
118
- except KeyError:
118
+ except KeyError as e:
119
+ print(e)
119
120
  logger.debug("No coordinates found for %s", self.entity_id)
120
121
  return None
121
122
 
@@ -1,4 +1,5 @@
1
1
  import typing
2
+
2
3
  from mousetools.entities.base import EntityBase
3
4
  from mousetools.ids import FacilityServiceEntityTypes
4
5
 
@@ -74,6 +75,8 @@ class MenuItem:
74
75
  except KeyError:
75
76
  return None
76
77
 
78
+ return None
79
+
77
80
 
78
81
  class Menu:
79
82
  def __init__(self, raw_menu_data: dict):
@@ -1,7 +1,8 @@
1
+ import logging
1
2
  import typing
3
+
2
4
  from mousetools.entities.base import EntityBase
3
5
  from mousetools.ids import FacilityServiceEntityTypes
4
- import logging
5
6
 
6
7
  logger = logging.getLogger(__name__)
7
8
 
@@ -30,8 +30,6 @@ class DisneyAPIMixin:
30
30
  logger.info("Sending request to %s", url)
31
31
  response = httpx.get(url, headers=auth_obj.get_headers())
32
32
  logger.debug("Response status: %s", response.status_code)
33
- if response.status_code == httpx._status_codes.codes.NOT_FOUND:
34
- raise EntityIDNotFoundError
35
33
 
36
34
  try:
37
35
  response.raise_for_status()
@@ -49,6 +47,8 @@ class DisneyAPIMixin:
49
47
  logger.debug("Sending new request to %s", url)
50
48
  response = httpx.get(url, headers=auth_obj.get_headers())
51
49
  logger.debug("Response status: %s", response.status_code)
50
+ if response.status_code == httpx._status_codes.codes.NOT_FOUND:
51
+ raise EntityIDNotFoundError
52
52
  response.raise_for_status()
53
53
  data = response.json()
54
54
 
@@ -1,7 +1,3 @@
1
- [build-system]
2
- requires = ["setuptools"]
3
- build-backend = "setuptools.build_meta"
4
-
5
1
  [project]
6
2
  name = "MouseTools"
7
3
  dynamic = ["version"]
@@ -21,6 +17,23 @@ classifiers = [
21
17
 
22
18
  [project.urls]
23
19
  repository = "https://gitlab.com/caratozzoloxyz/public/MouseTools"
20
+ documentation = "https://caratozzoloxyz.gitlab.io/public/MouseTools/"
21
+
22
+ [tool.uv]
23
+ dev-dependencies = [
24
+ "mkdocs>=1.6.1",
25
+ "mkdocs-material>=9.5.33",
26
+ "mkdocstrings[python]>=0.25.2",
27
+ "mypy>=1.11.2",
28
+ "pre-commit>=3.5.0",
29
+ "pytest-cov>=5.0.0",
30
+ "pytest>=8.3.2",
31
+ "ruff>=0.6.3",
32
+ ]
33
+
34
+ [build-system]
35
+ requires = ["setuptools"]
36
+ build-backend = "setuptools.build_meta"
24
37
 
25
38
  [tool.setuptools.dynamic]
26
39
  version = {attr = "mousetools.__version__"}
@@ -67,49 +80,64 @@ minor_tags = ["feat"]
67
80
  patch_tags = ["fix", "perf"]
68
81
  default_bump_level = 0
69
82
 
70
- [tool.semantic_release.remote]
71
- name = "origin"
72
- type = "gitlab"
73
- ignore_token_for_push = true
74
- insecure = false
75
- token = { env = "GITLAB_TOKEN" }
76
-
77
83
  [tool.semantic_release.publish]
78
- dist_glob_patterns = ["dist/*"]
79
84
  upload_to_vcs_release = false
80
85
 
86
+ [tool.pytest.ini_options]
87
+ testpaths = ["tests"]
88
+
81
89
 
82
90
  [tool.ruff]
83
91
  target-version = "py39"
92
+ line-length = 120
84
93
 
85
94
  [tool.ruff.lint]
86
95
  select = [
87
- "F",
88
- "E",
89
- "W",
90
- "I",
91
- "N",
96
+ # flake8-2020
97
+ "YTT",
98
+ # flake8-bandit
99
+ "S",
100
+ # flake8-bugbear
101
+ "B",
102
+ # flake8-builtins
92
103
  "A",
104
+ # flake8-comprehensions
93
105
  "C4",
94
- "DTZ002", "DTZ003",
95
- "G010",
96
- "T20",
97
- "ERA",
98
- "PL",
106
+ # flake8-debugger
107
+ "T10",
108
+ # flake8-simplify
109
+ "SIM",
110
+ # isort
111
+ "I",
112
+ # mccabe
113
+ "C90",
114
+ # pycodestyle
115
+ "E", "W",
116
+ # pyflakes
117
+ "F",
118
+ # pyupgrade
119
+ "UP",
120
+ # ruff
121
+ "RUF",
99
122
  ]
100
-
101
123
  ignore = [
124
+ # LineTooLong
102
125
  "E501",
126
+ # DoNotAssignLambda
127
+ "E731",
103
128
  ]
104
129
 
105
- [tool.uv]
106
- dev-dependencies = [
107
- "mkdocs>=1.6.1",
108
- "mkdocs-material>=9.5.33",
109
- "mkdocstrings[python]>=0.25.2",
110
- "mypy>=1.11.2",
111
- "pre-commit>=3.5.0",
112
- "pytest-cov>=5.0.0",
113
- "pytest>=8.3.2",
114
- "ruff>=0.6.3",
115
- ]
130
+ [tool.ruff.lint.per-file-ignores]
131
+ # Use of `assert` detected
132
+ "**/tests/*" = ["S101"]
133
+
134
+
135
+ [tool.mypy]
136
+ python_version = "3.9"
137
+ files = ["mousetools"]
138
+ disallow_untyped_defs = "True"
139
+ disallow_any_unimported = "True"
140
+ no_implicit_optional = "True"
141
+ check_untyped_defs = "True"
142
+ warn_unused_ignores = "True"
143
+ show_error_codes = "True"
File without changes
@@ -8,13 +8,13 @@ from mousetools.entities.entertainment_venue import EntertainmentVenue
8
8
  from mousetools.entities.event import Event
9
9
  from mousetools.entities.guest_services import GuestServices
10
10
  from mousetools.entities.land import Land
11
+ from mousetools.entities.menu import Menus
11
12
  from mousetools.entities.merchandise_facility import MerchandiseFacility
12
13
  from mousetools.entities.park import ThemePark, WaterPark
13
14
  from mousetools.entities.point_of_interest import PointOfInterest
14
15
  from mousetools.entities.resort import Resort
15
16
  from mousetools.entities.resort_area import ResortArea
16
17
  from mousetools.entities.restaurant import Restaurant
17
- from mousetools.entities.menu import Menus
18
18
  from mousetools.ids import DestinationIds
19
19
 
20
20
  WALT_DISNEY_WORLD_DESTINATION = Destination(DestinationIds.WALT_DISNEY_WORLD)
@@ -13,13 +13,13 @@ from mousetools.entities.entertainment_venue import EntertainmentVenue
13
13
  from mousetools.entities.event import Event
14
14
  from mousetools.entities.guest_services import GuestServices
15
15
  from mousetools.entities.land import Land
16
+ from mousetools.entities.menu import Menus
16
17
  from mousetools.entities.merchandise_facility import MerchandiseFacility
17
18
  from mousetools.entities.park import ThemePark, WaterPark
18
19
  from mousetools.entities.point_of_interest import PointOfInterest
19
20
  from mousetools.entities.resort import Resort
20
21
  from mousetools.entities.resort_area import ResortArea
21
22
  from mousetools.entities.restaurant import Restaurant
22
- from mousetools.entities.menu import Menus
23
23
  from mousetools.ids import (
24
24
  DestinationIds,
25
25
  DisneylandResortParkIds,