Make mypy happy
This commit is contained in:
parent
4d280e02b0
commit
0920559a82
@ -23,7 +23,7 @@
|
|||||||
import datetime
|
import datetime
|
||||||
import keyword
|
import keyword
|
||||||
import re
|
import re
|
||||||
from typing import Union, Set, Any, Callable
|
from typing import Union, Set, Any, Callable, Type
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
|
|
||||||
@ -34,8 +34,8 @@ _date_regexp = re.compile(
|
|||||||
CastValue = Union[str, int, float, 'Rdate']
|
CastValue = Union[str, int, float, 'Rdate']
|
||||||
|
|
||||||
|
|
||||||
def guess_type(value: str) -> Set[Callable[[Any], Any]]:
|
def guess_type(value: str) -> Set[Union[Callable[[Any], Any], Type['Rdate']]]:
|
||||||
r: Set[Callable[[Any], Any]] = {str}
|
r: Set[Union[Callable[[Any], Any], Type['Rdate']]] = {str}
|
||||||
if _date_regexp.match(value) is not None:
|
if _date_regexp.match(value) is not None:
|
||||||
r.add(Rdate)
|
r.add(Rdate)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user