mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-09 17:33:44 +00:00
Move base types to base module.
This commit is contained in:
parent
00cc42c216
commit
14d250bfbd
2 changed files with 9 additions and 10 deletions
|
|
@ -1,6 +1,3 @@
|
|||
import io as _io
|
||||
from typing import TypeVar as _TypeVar
|
||||
|
||||
from . import base
|
||||
from . import fields
|
||||
|
||||
|
|
@ -8,10 +5,3 @@ __all__ = (
|
|||
'base', 'fields',
|
||||
'InputFile', 'String', 'Integer', 'Float', 'Boolean'
|
||||
)
|
||||
|
||||
# Binding of builtin types
|
||||
InputFile = _TypeVar('InputFile', _io.BytesIO, _io.FileIO, str)
|
||||
String = _TypeVar('String', bound=str)
|
||||
Integer = _TypeVar('Integer', bound=int)
|
||||
Float = _TypeVar('Float', bound=float)
|
||||
Boolean = _TypeVar('Boolean', bound=bool)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
import io
|
||||
import typing
|
||||
import ujson
|
||||
from typing import TypeVar
|
||||
|
||||
from .fields import BaseField
|
||||
|
||||
|
|
@ -9,6 +11,13 @@ ALIASES_ATTR_NAME = '_aliases'
|
|||
|
||||
__all__ = ('MetaTelegramObject', 'TelegramObject')
|
||||
|
||||
# Binding of builtin types
|
||||
InputFile = TypeVar('InputFile', io.BytesIO, io.FileIO, str)
|
||||
String = TypeVar('String', bound=str)
|
||||
Integer = TypeVar('Integer', bound=int)
|
||||
Float = TypeVar('Float', bound=float)
|
||||
Boolean = TypeVar('Boolean', bound=bool)
|
||||
|
||||
|
||||
class MetaTelegramObject(type):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue