Add Windows conda-less support

This commit is contained in:
allegroai 2019-06-14 15:09:23 +03:00
parent e24abf2153
commit 60b2246966
2 changed files with 16 additions and 2 deletions

View File

@ -1,9 +1,16 @@
import base64
from distutils.util import strtobool
from typing import Union, Optional, Text, Any, TypeVar, Callable, Tuple
from typing import Union, Optional, Any, TypeVar, Callable, Tuple
import six
try:
from typing import Text
except ImportError:
# windows conda-less hack
Text = Any
ConverterType = TypeVar("ConverterType", bound=Callable[[Any], Any])

View File

@ -1,10 +1,17 @@
import abc
from typing import Optional, Any, Tuple, Text, Callable, Dict
from typing import Optional, Any, Tuple, Callable, Dict
import six
from .converters import any_to_bool
try:
from typing import Text
except ImportError:
# windows conda-less hack
Text = Any
NotSet = object()
Converter = Callable[[Any], Any]