Skip to content

Commit

Permalink
Run black
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy-Grigg committed Feb 16, 2024
1 parent 50e0cfc commit da2735e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
1 change: 1 addition & 0 deletions src/ansys/openapi/common/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Provides a helper to create sessions for use with Ansys OpenAPI clients."""

from importlib import metadata as metadata

__version__ = metadata.version("ansys-openapi-common")
Expand Down
12 changes: 4 additions & 8 deletions src/ansys/openapi/common/_base/_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ class ModelBase(metaclass=abc.ABCMeta):
attribute_map: Dict[str, str]

@abc.abstractmethod
def __init__(self, *args: Any, **kwargs: Any) -> None:
...
def __init__(self, *args: Any, **kwargs: Any) -> None: ...

def to_dict(self) -> Dict:
"""Returns the model properties as a dict
Expand Down Expand Up @@ -98,13 +97,11 @@ class ApiClientBase(metaclass=abc.ABCMeta):

@staticmethod
@abc.abstractmethod
def select_header_accept(accepts: Optional[List[str]]) -> Optional[str]:
...
def select_header_accept(accepts: Optional[List[str]]) -> Optional[str]: ...

@staticmethod
@abc.abstractmethod
def select_header_content_type(content_types: Optional[List[str]]) -> str:
...
def select_header_content_type(content_types: Optional[List[str]]) -> str: ...

@abc.abstractmethod
def call_api(
Expand All @@ -123,5 +120,4 @@ def call_api(
_preload_content: bool = True,
_request_timeout: Union[float, Tuple[float, float], None] = None,
response_type_map: Optional[Dict[int, Union[str, None]]] = None,
) -> Union[requests.Response, DeserializedType, None]:
...
) -> Union[requests.Response, DeserializedType, None]: ...
8 changes: 5 additions & 3 deletions src/ansys/openapi/common/_oidc.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,11 @@ def __init__(
authorization_url=self._well_known_parameters["authorization_endpoint"],
token_url=self._well_known_parameters["token_endpoint"],
redirect_uri_port=32284,
audience=self._authenticate_parameters["apiAudience"]
if "apiAudience" in self._authenticate_parameters
else None,
audience=(
self._authenticate_parameters["apiAudience"]
if "apiAudience" in self._authenticate_parameters
else None
),
client_id=self._authenticate_parameters["clientid"],
scope=scopes,
session=self._initial_session,
Expand Down

0 comments on commit da2735e

Please sign in to comment.