@@ -62,12 +62,10 @@ async def get_current_position_async(
6262 configuration: Additional configuration for the location request.
6363 If not specified, then the [`Geolocator.configuration`][(p).] property is used.
6464 timeout: The maximum amount of time (in seconds) to wait for a response.
65-
66- Raises:
67- TimeoutError: If the request times out.
68-
6965 Returns:
7066 The current position of the device as a [`GeolocatorPosition`][(p).].
67+ Raises:
68+ TimeoutError: If the request times out.
7169
7270 Note:
7371 Depending on the availability of different location services, this can take several seconds.
@@ -88,17 +86,16 @@ async def get_last_known_position_async(
8886 Gets the last known position stored on the user's device.
8987 The accuracy can be defined using the [`Geolocator.configuration`][(p).] property.
9088
91- Not supported on web plaform.
89+ Note:
90+ This method is not supported on web plaform.
9291
9392 Args:
9493 timeout: The maximum amount of time (in seconds) to wait for a response.
95-
96- Raises:
97- AssertionError: If called on a web page, as this method is not supported on web.
98- TimeoutError: If the request times out.
99-
10094 Returns:
10195 `True` if the app's settings were opened successfully, `False` otherwise.
96+ Raises:
97+ AssertionError: If invoked on a web platform.
98+ TimeoutError: If the request times out.
10299 """
103100 assert not self .page .web , "get_last_known_position is not supported on web"
104101 r = await self ._invoke_method_async ("get_last_known_position" , timeout = timeout )
@@ -112,12 +109,10 @@ async def get_permission_status_async(
112109
113110 Args:
114111 timeout: The maximum amount of time (in seconds) to wait for a response.
115-
116- Raises:
117- TimeoutError: If the request times out.
118-
119112 Returns:
120113 The status of the permission.
114+ Raises:
115+ TimeoutError: If the request times out.
121116 """
122117 r = await self ._invoke_method_async ("get_permission_status" , timeout = timeout )
123118 return GeolocatorPermissionStatus (r )
@@ -130,12 +125,10 @@ async def request_permission_async(
130125
131126 Args:
132127 timeout: The maximum amount of time (in seconds) to wait for a response.
133-
134- Raises:
135- TimeoutError: If the request times out.
136-
137128 Returns:
138129 The status of the permission request.
130+ Raises:
131+ TimeoutError: If the request times out.
139132 """
140133 r = await self ._invoke_method_async ("request_permission" , timeout = timeout )
141134 return GeolocatorPermissionStatus (r )
@@ -146,12 +139,10 @@ async def is_location_service_enabled_async(self, timeout: float = 10) -> bool:
146139
147140 Args:
148141 timeout: The maximum amount of time (in seconds) to wait for a response.
149-
150- Raises:
151- TimeoutError: If the request times out.
152-
153142 Returns:
154143 `True` if location service is enabled, `False` otherwise.
144+ Raises:
145+ TimeoutError: If the request times out.
155146 """
156147 return await self ._invoke_method_async (
157148 "is_location_service_enabled" , timeout = timeout
@@ -161,17 +152,16 @@ async def open_app_settings_async(self, timeout: float = 10) -> bool:
161152 """
162153 Attempts to open the app's settings.
163154
164- Not supported on web plaform.
155+ Note:
156+ This method is not supported on web plaform.
165157
166158 Args:
167159 timeout: The maximum amount of time (in seconds) to wait for a response.
168-
169- Raises:
170- AssertionError: If called on a web page, as this method is not supported on web.
171- TimeoutError: If the request times out.
172-
173160 Returns:
174161 `True` if the app's settings were opened successfully, `False` otherwise.
162+ Raises:
163+ AssertionError: If invoked on a web platform.
164+ TimeoutError: If the request times out.
175165 """
176166 assert not self .page .web , "open_app_settings is not supported on web"
177167 return await self ._invoke_method_async ("open_app_settings" , timeout = timeout )
@@ -180,35 +170,33 @@ def open_location_settings(self, timeout: float = 10):
180170 """
181171 Attempts to open the device's location settings.
182172
183- Not supported on web plaform.
173+ Note:
174+ This method is not supported on web plaform.
184175
185176 Args:
186177 timeout: The maximum amount of time (in seconds) to wait for a response.
187-
188- Raises:
189- AssertionError: If called on a web page, as this method is not supported on web.
190- TimeoutError: If the request times out.
191-
192178 Returns:
193179 `True` if the device's settings were opened successfully, `False` otherwise.
180+ Raises:
181+ AssertionError: If invoked on a web platform.
182+ TimeoutError: If the request times out.
194183 """
195184 asyncio .create_task (self .open_location_settings_async (timeout = timeout ))
196185
197186 async def open_location_settings_async (self , timeout : float = 10 ):
198187 """
199188 Attempts to open the device's location settings.
200189
201- Not supported on web plaform.
190+ Note:
191+ This method is not supported on web plaform.
202192
203193 Args:
204194 timeout: The maximum amount of time (in seconds) to wait for a response.
205-
206- Raises:
207- AssertionError: If called on a web page, as this method is not supported on web.
208- TimeoutError: If the request times out.
209-
210195 Returns:
211196 `True` if the device's settings were opened successfully, `False` otherwise.
197+ Raises:
198+ AssertionError: If invoked on a web platform.
199+ TimeoutError: If the request times out.
212200 """
213201 assert not self .page .web , "open_location_settings is not supported on web"
214202 await self ._invoke_method_async ("open_location_settings" , timeout = timeout )
@@ -233,15 +221,13 @@ async def distance_between_async(
233221 end_latitude: The latitude of the ending point, in degrees.
234222 end_longitude: The longitude of the ending point, in degrees.
235223 timeout: The maximum amount of time (in seconds) to wait for a response.
236-
237- Raises:
238- TimeoutError: If the request times out.
239-
240224 Returns:
241225 The distance between the coordinates in meters.
226+ Raises:
227+ TimeoutError: If the request times out.
242228 """
243229 await self ._invoke_method_async (
244- "distance_between" ,
230+ method_name = "distance_between" ,
245231 arguments = {
246232 "start_latitude" : start_latitude ,
247233 "start_longitude" : start_longitude ,
0 commit comments