Skip to content
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
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
9 changes: 7 additions & 2 deletions src/multisafepay/api/base/listings/listing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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.

Expand Down
10 changes: 7 additions & 3 deletions src/multisafepay/api/base/response/custom_api_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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)
Expand Down