Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lint project with black 24.1.1 #487

Merged
merged 1 commit into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = 'en'
language = "en"

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand Down Expand Up @@ -120,8 +120,8 @@
"show_breadcrumbs": True,
"additional_breadcrumbs": [
("PyAnsys Documentation", "https://docs.pyansys.com"),
("Shared Components", "https://shared.docs.pyansys.com")
]
("Shared Components", "https://shared.docs.pyansys.com"),
],
}

# -- Options for HTMLHelp output ---------------------------------------------
Expand Down
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
Loading