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 = [
"ANN204",
"ANN401",
"ARG002",
"B006",
Expand Down
2 changes: 1 addition & 1 deletion src/multisafepay/api/base/abstract_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class AbstractManager:
"""

def __init__(self: "AbstractManager", client: Client):
def __init__(self: "AbstractManager", client: Client) -> None:
"""
Initialize the AbstractManager with a Client instance.
Expand Down
8 changes: 4 additions & 4 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, Dict, Generic, List, TypeVar
from typing import Any, Dict, Generic, Iterator, List, TypeVar

from pydantic.main import BaseModel

Expand All @@ -29,7 +29,7 @@ def __init__(
data: List[Any],
class_type: type,
**kwargs: Dict[str, Any],
):
) -> None:
"""
Initialize the Listing with data and a class type.

Expand All @@ -53,7 +53,7 @@ def __init__(

super().__init__(data=elements)

def __iter__(self: "Listing"):
def __iter__(self: "Listing") -> Iterator[T]:
"""
Return an iterator over the items in the listing.

Expand All @@ -79,7 +79,7 @@ def __getitem__(self: "Listing", index: int) -> T:
"""
return self.data[index]

def __len__(self: "Listing"):
def __len__(self: "Listing") -> int:
"""
Get the number of items in the listing.

Expand Down
2 changes: 1 addition & 1 deletion src/multisafepay/api/base/listings/listing_pager.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def __init__(
data: list,
pager: Optional[Pager],
class_type: type,
):
) -> None:
"""
Initialize the ListingPager with data, pager, and class type.

Expand Down
2 changes: 1 addition & 1 deletion src/multisafepay/api/base/response/custom_api_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def __init__(
self: "CustomApiResponse",
data: Optional[Any],
**kwargs: Dict[str, Any],
):
) -> None:
"""
Initialize the CustomApiResponse with optional data and additional keyword arguments.

Expand Down
2 changes: 1 addition & 1 deletion src/multisafepay/api/paths/auth/auth_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class AuthManager(AbstractManager):
A manager class for handling authentication-related operations.
"""

def __init__(self: "AuthManager", client: Client):
def __init__(self: "AuthManager", client: Client) -> None:
"""
Initialize the CaptureManager with a client.

Expand Down
2 changes: 1 addition & 1 deletion src/multisafepay/api/paths/capture/capture_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class CaptureManager(AbstractManager):
A class to manage capture operations.
"""

def __init__(self: "CaptureManager", client: Client):
def __init__(self: "CaptureManager", client: Client) -> None:
"""
Initialize the CaptureManager with a client.

Expand Down
2 changes: 1 addition & 1 deletion src/multisafepay/api/paths/categories/category_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class CategoryManager(AbstractManager):
A manager class for handling category-related API requests.
"""

def __init__(self: "CategoryManager", client: Client):
def __init__(self: "CategoryManager", client: Client) -> None:
"""
Initialize the CategoryManager with a client.
Expand Down
2 changes: 1 addition & 1 deletion src/multisafepay/api/paths/gateways/gateway_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class GatewayManager(AbstractManager):
Manages gateway-related operations.
"""

def __init__(self: "GatewayManager", client: Client):
def __init__(self: "GatewayManager", client: Client) -> None:
"""
Initialize the CategoryManager with a client.
Expand Down
2 changes: 1 addition & 1 deletion src/multisafepay/api/paths/issuers/issuer_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class IssuerManager(AbstractManager):
Manager class for handling issuer-related operations.
"""

def __init__(self: "IssuerManager", client: Client):
def __init__(self: "IssuerManager", client: Client) -> None:
"""
Initialize the IssuerManager with a client.

Expand Down
2 changes: 1 addition & 1 deletion src/multisafepay/api/paths/me/me_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class MeManager(AbstractManager):
A manager class for handling 'me' related API requests.
"""

def __init__(self: "MeManager", client: Client):
def __init__(self: "MeManager", client: Client) -> None:
"""
Initialize the MeManager with a client.

Expand Down
2 changes: 1 addition & 1 deletion src/multisafepay/api/paths/orders/order_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class OrderManager(AbstractManager):
Manages operations related to orders, such as creating, updating, capturing, and refunding orders.
"""

def __init__(self: "OrderManager", client: Client):
def __init__(self: "OrderManager", client: Client) -> None:
"""
Initialize the OrderManager with a client.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class PaymentMethodManager(AbstractManager):
A class representing the PaymentMethodManager.
"""

def __init__(self: "PaymentMethodManager", client: Client):
def __init__(self: "PaymentMethodManager", client: Client) -> None:
"""
Initialize the CaptureManager with a client.

Expand Down
2 changes: 1 addition & 1 deletion src/multisafepay/api/paths/recurring/recurring_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class RecurringManager(AbstractManager):
CREDIT_CARD_GATEWAY_CODE = "CREDITCARD"
CREDIT_CARD_GATEWAYS = ["VISA", "MASTERCARD", "AMEX", "MAESTRO"]

def __init__(self: "RecurringManager", client: Client):
def __init__(self: "RecurringManager", client: Client) -> None:
"""
Initializes the RecurringManager with a client.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class TransactionManager(AbstractManager):
A class representing the TransactionManager.
"""

def __init__(self: "TransactionManager", client: Client):
def __init__(self: "TransactionManager", client: Client) -> None:
"""
Initialize the CaptureManager with a client.

Expand Down
2 changes: 1 addition & 1 deletion src/multisafepay/client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(
is_production: bool,
http_client: Optional[Session] = None,
locale: str = "en_US",
):
) -> None:
"""
Initialize the Client.

Expand Down
6 changes: 5 additions & 1 deletion src/multisafepay/exception/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ class ApiException(Exception):

"""

def __init__(self: "ApiException", message: str, context: dict = {}):
def __init__(
self: "ApiException",
message: str,
context: dict = {},
) -> None:
"""
Initialize the ApiException.

Expand Down
2 changes: 1 addition & 1 deletion src/multisafepay/sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def __init__(
is_production: bool,
http_client: Optional[Client] = None,
locale: str = "en_US",
):
) -> None:
"""
Initialize the SDK with the provided configuration.

Expand Down
8 changes: 4 additions & 4 deletions src/multisafepay/util/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# See the DISCLAIMER.md file for disclaimer details.


from typing import Dict, List
from typing import Dict, Iterator, List

from pydantic import BaseModel, Field

Expand Down Expand Up @@ -36,7 +36,7 @@ class MessageList(BaseModel):

__root__: List[Message] = Field(default_factory=list)

def __iter__(self: "MessageList"):
def __iter__(self: "MessageList") -> Iterator[Message]:
"""
Iterate over the messages in the list.

Expand All @@ -47,7 +47,7 @@ def __iter__(self: "MessageList"):
"""
return iter(self.__root__)

def __getitem__(self: "MessageList", index: int):
def __getitem__(self: "MessageList", index: int) -> "Message":
"""
Get a message by index.

Expand All @@ -62,7 +62,7 @@ def __getitem__(self: "MessageList", index: int):
"""
return self.__root__[index]

def __len__(self: "MessageList"):
def __len__(self: "MessageList") -> int:
"""
Get the number of messages in the list.

Expand Down
2 changes: 1 addition & 1 deletion src/multisafepay/value_object/date.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Date(InmutableModel):
timestamp: float
str_date: str

def __init__(self: "Date", date: str):
def __init__(self: "Date", date: str) -> None:
"""
Initialize a Date object.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@


class MockItem:
def __init__(self: "MockItem", value: Any):
def __init__(self: "MockItem", value: Any) -> None:
"""
Initialize a MockItem with a given value.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


class MockItem:
def __init__(self: "MockItem", value: Any):
def __init__(self: "MockItem", value: Any) -> None:
self.value = value


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


class MockItem:
def __init__(self: "MockItem", value: Any):
def __init__(self: "MockItem", value: Any) -> None:
"""
Initialize a MockItem with a given value.

Expand Down