-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OPT: add
__slots__
to the dataclasses ⚡️
- Loading branch information
Showing
11 changed files
with
32 additions
and
28 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from sys import version_info | ||
|
||
SLOTS = {"slots": True} if version_info >= (3, 10) else {} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
from abc import ABC | ||
from dataclasses import dataclass | ||
|
||
from combadge._helpers.dataclasses import SLOTS | ||
|
||
@dataclass | ||
|
||
@dataclass(**SLOTS) | ||
class BaseBackendRequest(ABC): # noqa: B024 | ||
"""Base class for protocol-dependent requests.""" | ||
|
||
__slots__ = () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
from dataclasses import dataclass | ||
|
||
from combadge._helpers.dataclasses import SLOTS | ||
from combadge.support.http.abc import ContainsPayload | ||
from combadge.support.shared.request import BaseBackendRequest | ||
from combadge.support.soap.abc import ContainsOperationName | ||
|
||
|
||
@dataclass | ||
@dataclass(**SLOTS) | ||
class Request(ContainsOperationName, ContainsPayload, BaseBackendRequest): | ||
"""Backend-agnostic SOAP request.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters