mirror of
https://github.com/bohd4nx/FragmentAPI.git
synced 2026-07-25 06:14:29 +00:00
feat: add Highload wallet versions and update mypy exclusion patterns
This commit is contained in:
@@ -13,6 +13,7 @@ and this project uses [Calendar Versioning](https://calver.org/) (`YYYY.MINOR.MI
|
||||
|
||||
- New `AlreadySubscribedError` exception for Premium purchase flows when Fragment returns: `This account is already subscribed to Telegram Premium.`
|
||||
- New `UserNotFoundError.NOT_A_USER` message for when Fragment returns: `Please enter a username assigned to a user.` (e.g. when the username belongs to a channel or bot).
|
||||
- Added `WalletVersion.HighloadV2` and `WalletVersion.HighloadV3R1` to `WalletVersion`
|
||||
|
||||
### Changed
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import sys
|
||||
from enum import Enum
|
||||
from typing import Any
|
||||
|
||||
from tonutils.contracts.wallet import WalletV4R2, WalletV5R1
|
||||
from tonutils.contracts.wallet import WalletHighloadV2, WalletHighloadV3R1, WalletV4R2, WalletV5R1
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
from enum import StrEnum
|
||||
@@ -29,11 +29,15 @@ class PaymentMethod(StrEnum):
|
||||
class WalletVersion(StrEnum):
|
||||
V4R2 = "V4R2"
|
||||
V5R1 = "V5R1"
|
||||
HighloadV2 = "HighloadV2"
|
||||
HighloadV3R1 = "HighloadV3R1"
|
||||
|
||||
|
||||
WALLET_CLASSES: dict[WalletVersion, Any] = {
|
||||
WalletVersion.V4R2: WalletV4R2,
|
||||
WalletVersion.V5R1: WalletV5R1,
|
||||
WalletVersion.HighloadV2: WalletHighloadV2,
|
||||
WalletVersion.HighloadV3R1: WalletHighloadV3R1,
|
||||
}
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -91,7 +91,7 @@ ignore = ["E501", "UP017"]
|
||||
[tool.mypy]
|
||||
python_version = "3.10"
|
||||
strict = true
|
||||
exclude = ["^examples/"]
|
||||
exclude = ["^examples/", "^logs/"]
|
||||
|
||||
[[tool.mypy.overrides]]
|
||||
module = "rookiepy"
|
||||
|
||||
Reference in New Issue
Block a user