Make mypy happy

master
Salvo 'LtWorf' Tomaselli 2020-08-24 18:38:10 +07:00
parent 4d280e02b0
commit 0920559a82
No known key found for this signature in database
GPG Key ID: B3A7CF0C801886CF
1 changed files with 3 additions and 3 deletions

@ -23,7 +23,7 @@
import datetime
import keyword
import re
from typing import Union, Set, Any, Callable
from typing import Union, Set, Any, Callable, Type
from dataclasses import dataclass
@ -34,8 +34,8 @@ _date_regexp = re.compile(
CastValue = Union[str, int, float, 'Rdate']
def guess_type(value: str) -> Set[Callable[[Any], Any]]:
r: Set[Callable[[Any], Any]] = {str}
def guess_type(value: str) -> Set[Union[Callable[[Any], Any], Type['Rdate']]]:
r: Set[Union[Callable[[Any], Any], Type['Rdate']]] = {str}
if _date_regexp.match(value) is not None:
r.add(Rdate)