diff --git a/pyproject.toml b/pyproject.toml index 76df706..b551f96 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -98,7 +98,6 @@ extend-safe-fixes = [ "D415", # docstrings should end with a period, question mark, or exclamation point ] ignore = [ - "ANN003", "ANN101", # missing type annotation for self "ANN102", # missing type annotation for cls "ANN201", diff --git a/src/multisafepay/api/base/listings/listing.py b/src/multisafepay/api/base/listings/listing.py index 0277d5f..4b2ea08 100644 --- a/src/multisafepay/api/base/listings/listing.py +++ b/src/multisafepay/api/base/listings/listing.py @@ -5,7 +5,7 @@ # See the DISCLAIMER.md file for disclaimer details. -from typing import Any, Generic, List, TypeVar +from typing import Any, Dict, Generic, List, TypeVar from pydantic.main import BaseModel @@ -24,7 +24,12 @@ class Listing(Generic[T], BaseModel): data: List[T] - def __init__(self, data: List[Any], class_type: type, **kwargs): + def __init__( + self, + data: List[Any], + class_type: type, + **kwargs: Dict[str, Any], + ): """ Initialize the Listing with data and a class type. diff --git a/src/multisafepay/api/base/response/custom_api_response.py b/src/multisafepay/api/base/response/custom_api_response.py index 6569ad3..f7aa857 100644 --- a/src/multisafepay/api/base/response/custom_api_response.py +++ b/src/multisafepay/api/base/response/custom_api_response.py @@ -5,7 +5,7 @@ # See the DISCLAIMER.md file for disclaimer details. -from typing import Any, Optional +from typing import Any, Dict, Optional from multisafepay.api.base.response.api_response import ApiResponse @@ -22,14 +22,18 @@ class CustomApiResponse(ApiResponse): data: Optional[Any] - def __init__(self: "CustomApiResponse", data: Optional[Any], **kwargs): + def __init__( + self: "CustomApiResponse", + data: Optional[Any], + **kwargs: Dict[str, Any], + ): """ Initialize the CustomApiResponse with optional data and additional keyword arguments. Parameters ---------- data: (Any, optional) The data to be included in the response, by default None. - **kwargs: (dict) Additional keyword arguments to be set as attributes of the response. + **kwargs: Additional keyword arguments to be set as attributes of the response. """ super().__init__(**kwargs)