mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-04-27 17:11:27 +08:00
Vendored
+1
-1
@@ -25,7 +25,7 @@ from typing import (
|
||||
_KT = TypeVar('_KT')
|
||||
_VT = TypeVar('_VT')
|
||||
|
||||
if sys.version_info[0] >= 3:
|
||||
if sys.version_info >= (3,):
|
||||
# TODO move _StringIO definition into boto.compat once stubs exist and rename to StringIO
|
||||
import io
|
||||
_StringIO = io.StringIO
|
||||
|
||||
+1
-1
@@ -49,5 +49,5 @@ class EscapeFormatter(string.Formatter):
|
||||
def __init__(self, escape: Callable[[text_type], Markup]) -> None: ...
|
||||
def format_field(self, value: text_type, format_spec: text_type) -> Markup: ...
|
||||
|
||||
if sys.version_info[0] >= 3:
|
||||
if sys.version_info >= (3,):
|
||||
soft_str = soft_unicode
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ _V = TypeVar('_V')
|
||||
|
||||
PY2: bool
|
||||
def iteritems(d: Mapping[_K, _V]) -> Iterator[Tuple[_K, _V]]: ...
|
||||
if sys.version_info[0] >= 3:
|
||||
if sys.version_info >= (3,):
|
||||
text_type = str
|
||||
string_types = str,
|
||||
unichr = chr
|
||||
|
||||
+1
-8
@@ -4,11 +4,4 @@ import sys
|
||||
|
||||
needs_makedirs: bool
|
||||
|
||||
def _makedirs_31(path: Text, exist_ok: bool = ...) -> None: ...
|
||||
|
||||
# _makedirs_31 has special behavior to handle an edge case that was removed in
|
||||
# 3.4.1. No one should be using 3.4 instead of 3.4.1, so this should be fine.
|
||||
if sys.version_info >= (3,):
|
||||
makedirs = os.makedirs
|
||||
else:
|
||||
makedirs = _makedirs_31
|
||||
makedirs = os.makedirs
|
||||
|
||||
Reference in New Issue
Block a user