Skip to content

Commit 93bacee

Browse files
committed
PTHMINT-41: Fix error ANN003 occurences
1 parent bf36592 commit 93bacee

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ extend-safe-fixes = [
9898
"D415", # docstrings should end with a period, question mark, or exclamation point
9999
]
100100
ignore = [
101-
"ANN003",
102101
"ANN101", # missing type annotation for self
103102
"ANN102", # missing type annotation for cls
104103
"ANN201",

src/multisafepay/api/base/listings/listing.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
# See the DISCLAIMER.md file for disclaimer details.
77

8-
from typing import Any, Generic, List, TypeVar
8+
from typing import Any, Dict, Generic, List, TypeVar
99

1010
from pydantic.main import BaseModel
1111

@@ -24,7 +24,12 @@ class Listing(Generic[T], BaseModel):
2424

2525
data: List[T]
2626

27-
def __init__(self, data: List[Any], class_type: type, **kwargs):
27+
def __init__(
28+
self,
29+
data: List[Any],
30+
class_type: type,
31+
**kwargs: Dict[str, Any],
32+
):
2833
"""
2934
Initialize the Listing with data and a class type.
3035

src/multisafepay/api/base/response/custom_api_response.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
# See the DISCLAIMER.md file for disclaimer details.
77

8-
from typing import Any, Optional
8+
from typing import Any, Dict, Optional
99

1010
from multisafepay.api.base.response.api_response import ApiResponse
1111

@@ -22,14 +22,18 @@ class CustomApiResponse(ApiResponse):
2222

2323
data: Optional[Any]
2424

25-
def __init__(self: "CustomApiResponse", data: Optional[Any], **kwargs):
25+
def __init__(
26+
self: "CustomApiResponse",
27+
data: Optional[Any],
28+
**kwargs: Dict[str, Any],
29+
):
2630
"""
2731
Initialize the CustomApiResponse with optional data and additional keyword arguments.
2832
2933
Parameters
3034
----------
3135
data: (Any, optional) The data to be included in the response, by default None.
32-
**kwargs: (dict) Additional keyword arguments to be set as attributes of the response.
36+
**kwargs: Additional keyword arguments to be set as attributes of the response.
3337
3438
"""
3539
super().__init__(**kwargs)

0 commit comments

Comments
 (0)