Skip to content

Commit c6d4b95

Browse files
authored
Update Geolocation changelog for the release (#38359)
1 parent dad2f74 commit c6d4b95

37 files changed

+454
-578
lines changed

sdk/maps/azure-maps-geolocation/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Release History
22

3-
## 1.0.0b2 (2024-05-15)
3+
## 1.0.0b2 (2024-11-06)
44

55
### Other Changes
66

sdk/maps/azure-maps-geolocation/azure/maps/geolocation/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,5 @@
66
from ._version import VERSION
77
from ._geolocation_client import MapsGeolocationClient
88

9-
__all__ = [
10-
'MapsGeolocationClient'
11-
]
9+
__all__ = ["MapsGeolocationClient"]
1210
__version__ = VERSION

sdk/maps/azure-maps-geolocation/azure/maps/geolocation/_base_client.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,24 @@
99
from ._generated import GeolocationClient as _GeolocationClient
1010
from ._version import API_VERSION
1111

12+
1213
# To check the credential is either AzureKeyCredential or TokenCredential
1314
def _authentication_policy(credential):
1415
authentication_policy = None
1516
if credential is None:
1617
raise ValueError("Parameter 'credential' must not be None.")
1718
if isinstance(credential, AzureKeyCredential):
18-
authentication_policy = AzureKeyCredentialPolicy(
19-
name="subscription-key", credential=credential
20-
)
19+
authentication_policy = AzureKeyCredentialPolicy(name="subscription-key", credential=credential)
2120
elif credential is not None and not hasattr(credential, "get_token"):
2221
raise TypeError(
2322
"Unsupported credential: {}. Use an instance of AzureKeyCredential "
2423
"or a token credential from azure.identity".format(type(credential))
2524
)
2625
return authentication_policy
2726

27+
2828
class MapsGeolocationClientBase:
29-
def __init__(
30-
self,
31-
credential: Union[AzureKeyCredential, TokenCredential],
32-
**kwargs: Any
33-
) -> None:
29+
def __init__(self, credential: Union[AzureKeyCredential, TokenCredential], **kwargs: Any) -> None:
3430
self._maps_client = _GeolocationClient(
3531
credential=credential, # type: ignore
3632
api_version=kwargs.pop("api_version", API_VERSION),

sdk/maps/azure-maps-geolocation/azure/maps/geolocation/_generated/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
except ImportError:
1818
_patch_all = []
1919
from ._patch import patch_sdk as _patch_sdk
20-
__all__ = ['GeolocationClient']
20+
21+
__all__ = ["GeolocationClient"]
2122
__all__.extend([p for p in _patch_all if p not in __all__])
2223

2324
_patch_sdk()

sdk/maps/azure-maps-geolocation/azure/maps/geolocation/_generated/_client.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
# pylint: disable=unused-import,ungrouped-imports
2222
from azure.core.credentials import TokenCredential
2323

24+
2425
class GeolocationClient: # pylint: disable=client-accepts-api-version-keyword
2526
"""Azure Maps Geolocation REST APIs.
2627
@@ -55,16 +56,9 @@ def __init__(
5556
self._serialize = Serializer(client_models)
5657
self._deserialize = Deserializer(client_models)
5758
self._serialize.client_side_validation = False
58-
self.geolocation = GeolocationOperations(
59-
self._client, self._config, self._serialize, self._deserialize
60-
)
61-
59+
self.geolocation = GeolocationOperations(self._client, self._config, self._serialize, self._deserialize)
6260

63-
def send_request(
64-
self,
65-
request: HttpRequest,
66-
**kwargs: Any
67-
) -> HttpResponse:
61+
def send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
6862
"""Runs the network request through the client's chained policies.
6963
7064
>>> from azure.core.rest import HttpRequest

sdk/maps/azure-maps-geolocation/azure/maps/geolocation/_generated/_configuration.py

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -36,38 +36,34 @@ class GeolocationClientConfiguration(Configuration): # pylint: disable=too-many
3636
:paramtype api_version: str
3737
"""
3838

39-
def __init__(
40-
self,
41-
credential: "TokenCredential",
42-
client_id: Optional[str] = None,
43-
**kwargs: Any
44-
) -> None:
39+
def __init__(self, credential: "TokenCredential", client_id: Optional[str] = None, **kwargs: Any) -> None:
4540
super(GeolocationClientConfiguration, self).__init__(**kwargs)
46-
api_version = kwargs.pop('api_version', "1.0") # type: str
41+
api_version = kwargs.pop("api_version", "1.0") # type: str
4742

4843
if credential is None:
4944
raise ValueError("Parameter 'credential' must not be None.")
5045

5146
self.credential = credential
5247
self.client_id = client_id
5348
self.api_version = api_version
54-
self.credential_scopes = kwargs.pop('credential_scopes', ['https://atlas.microsoft.com/.default'])
55-
kwargs.setdefault('sdk_moniker', 'maps-geolocation/{}'.format(VERSION))
49+
self.credential_scopes = kwargs.pop("credential_scopes", ["https://atlas.microsoft.com/.default"])
50+
kwargs.setdefault("sdk_moniker", "maps-geolocation/{}".format(VERSION))
5651
self._configure(**kwargs)
5752

5853
def _configure(
59-
self,
60-
**kwargs # type: Any
54+
self, **kwargs # type: Any
6155
):
6256
# type: (...) -> None
63-
self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs)
64-
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
65-
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
66-
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
67-
self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs)
68-
self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs)
69-
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
70-
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
71-
self.authentication_policy = kwargs.get('authentication_policy')
57+
self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs)
58+
self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs)
59+
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
60+
self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
61+
self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs)
62+
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
63+
self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
64+
self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs)
65+
self.authentication_policy = kwargs.get("authentication_policy")
7266
if self.credential and not self.authentication_policy:
73-
self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
67+
self.authentication_policy = policies.BearerTokenCredentialPolicy(
68+
self.credential, *self.credential_scopes, **kwargs
69+
)

sdk/maps/azure-maps-geolocation/azure/maps/geolocation/_generated/_patch.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
__all__: List[str] = [] # Add all objects you want publicly available to users at this package level
1212

13+
1314
def patch_sdk():
1415
"""Do not remove from this file.
1516

0 commit comments

Comments
 (0)