Skip to content

Commit 18ec94f

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 3489f3c commit 18ec94f

File tree

20 files changed

+53
-64
lines changed

20 files changed

+53
-64
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ repos:
1313
- id: "check-toml"
1414

1515
- repo: https://github.com/psf/black
16-
rev: 25.1.0
16+
rev: 22.12.0
1717
hooks:
1818
- id: black
1919
files: &files '^(glQiwiApi|tests|examples|benchmarks|docs)'
@@ -31,6 +31,6 @@ repos:
3131
- id: sync_with_poetry
3232

3333
- repo: https://github.com/astral-sh/ruff-pre-commit
34-
rev: v0.11.8
34+
rev: v0.0.189
3535
hooks:
3636
- id: ruff

glQiwiApi/core/cache/storage.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,10 @@ async def delete(self, key: str) -> None:
3333
pass
3434

3535
@abc.abstractmethod
36-
async def retrieve_all(self) -> List[Any]:
37-
...
36+
async def retrieve_all(self) -> List[Any]: ...
3837

3938
@abc.abstractmethod
40-
async def contains_similar(self, item: Any) -> bool:
41-
...
39+
async def contains_similar(self, item: Any) -> bool: ...
4240

4341
def __getitem__(self, item: Any) -> Any:
4442
return self.retrieve(item)

glQiwiApi/core/event_fetching/webhooks/config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ class RoutesConfig:
4848
@dataclass()
4949
class EncryptionConfig:
5050
secret_p2p_key: str
51-
base64_encryption_key: Optional[
52-
str
53-
] = None # taken from QIWI API using QiwiWallet instance by default
51+
base64_encryption_key: Optional[str] = (
52+
None # taken from QIWI API using QiwiWallet instance by default
53+
)
5454

5555

5656
@dataclass()

glQiwiApi/core/request_service.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414

1515

1616
class RequestServiceProto(Protocol):
17-
async def execute_api_method(self, method: APIMethod[T], **url_kw: Any) -> T:
18-
...
17+
async def execute_api_method(self, method: APIMethod[T], **url_kw: Any) -> T: ...
1918

2019
async def get_json_content(
2120
self,
@@ -27,8 +26,7 @@ async def get_json_content(
2726
headers: Optional[Any] = None,
2827
params: Optional[Any] = None,
2928
**kwargs: Any,
30-
) -> Dict[str, Any]:
31-
...
29+
) -> Dict[str, Any]: ...
3230

3331
async def send_request(
3432
self,
@@ -40,11 +38,9 @@ async def send_request(
4038
headers: Optional[Any] = None,
4139
params: Optional[Any] = None,
4240
**kwargs: Any,
43-
) -> HTTPResponse:
44-
...
41+
) -> HTTPResponse: ...
4542

46-
async def shutdown(self) -> None:
47-
...
43+
async def shutdown(self) -> None: ...
4844

4945

5046
class RequestService:

glQiwiApi/qiwi/clients/p2p/methods/create_p2p_key_pair.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99

1010
class CreateP2PKeyPair(QiwiAPIMethod[PairOfP2PKeys]):
1111
http_method: ClassVar[str] = 'POST'
12-
url: ClassVar[
13-
str
14-
] = 'https://api.qiwi.com/partner/bill/v1/bills/widgets-api/api/p2p/protected/keys/create'
12+
url: ClassVar[str] = (
13+
'https://api.qiwi.com/partner/bill/v1/bills/widgets-api/api/p2p/protected/keys/create'
14+
)
1515

1616
json_payload_schema: ClassVar[Dict[str, Any]] = {
1717
'keysPairName': RuntimeValue(),

glQiwiApi/qiwi/clients/wallet/methods/authenticate_wallet.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77

88
class AuthenticateWallet(QiwiAPIMethod[Dict[str, Any]]):
9-
url: ClassVar[
10-
str
11-
] = 'https://edge.qiwi.com/identification/v1/persons/{phone_number}/identification'
9+
url: ClassVar[str] = (
10+
'https://edge.qiwi.com/identification/v1/persons/{phone_number}/identification'
11+
)
1212
http_method: ClassVar[str] = 'POST'
1313

1414
passport: str

glQiwiApi/qiwi/clients/wallet/methods/check_restriction.py

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

66

77
class GetRestrictions(QiwiAPIMethod[List[Restriction]]):
8-
url: ClassVar[
9-
str
10-
] = 'https://edge.qiwi.com/person-profile/v1/persons/{phone_number}/status/restrictions'
8+
url: ClassVar[str] = (
9+
'https://edge.qiwi.com/person-profile/v1/persons/{phone_number}/status/restrictions'
10+
)
1111
http_method: ClassVar[str] = 'GET'

glQiwiApi/qiwi/clients/wallet/methods/fetch_statistics.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010

1111

1212
class FetchStatistics(QiwiAPIMethod[Statistic]):
13-
url: ClassVar[
14-
str
15-
] = 'https://edge.qiwi.com/payment-history/v2/persons/{phone_number}/payments/total'
13+
url: ClassVar[str] = (
14+
'https://edge.qiwi.com/payment-history/v2/persons/{phone_number}/payments/total'
15+
)
1616
http_method: ClassVar[str] = 'GET'
1717

1818
start_date: datetime = Field(default_factory=datetime.now)

glQiwiApi/qiwi/clients/wallet/methods/get_available_balances.py

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

88
class GetAvailableBalances(QiwiAPIMethod[List[AvailableBalance]]):
99
http_method: ClassVar[str] = 'GET'
10-
url: ClassVar[
11-
str
12-
] = 'https://edge.qiwi.com/funding-sources/v2/persons/{phone_number}/accounts/offer'
10+
url: ClassVar[str] = (
11+
'https://edge.qiwi.com/funding-sources/v2/persons/{phone_number}/accounts/offer'
12+
)

glQiwiApi/qiwi/clients/wallet/methods/get_identification.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66

77
class GetIdentification(QiwiAPIMethod[Identification]):
88
http_method: ClassVar[str] = 'GET'
9-
url: ClassVar[
10-
str
11-
] = 'https://edge.qiwi.com/identification/v1/persons/{phone_number}/identification'
9+
url: ClassVar[str] = (
10+
'https://edge.qiwi.com/identification/v1/persons/{phone_number}/identification'
11+
)

0 commit comments

Comments
 (0)