mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 00:37:10 +08:00
Delete python 2 branches from third-party stubs (#7741)
Since #7703, we no longer have third-party stubs that support Python 2, so code like `if sys.version_info >= (3, 0)` can be simplified.
This commit is contained in:
@@ -1,20 +1,10 @@
|
||||
import sys
|
||||
from html.parser import HTMLParser as HTMLParser
|
||||
from io import StringIO as StringIO
|
||||
|
||||
if sys.version_info >= (3, 0):
|
||||
unicode = str
|
||||
unichr = chr
|
||||
basestring = str
|
||||
interactive_prompt = input
|
||||
from html.parser import HTMLParser as HTMLParser
|
||||
from io import StringIO as StringIO
|
||||
else:
|
||||
unicode = unicode
|
||||
unichr = unichr
|
||||
basestring = basestring
|
||||
interactive_prompt = raw_input # noqa: F821 # exists as a builtin in Python 2, but not in Python 3
|
||||
from StringIO import StringIO as StringIO
|
||||
|
||||
from HTMLParser import HTMLParser as HTMLParser
|
||||
unicode = str
|
||||
unichr = chr
|
||||
basestring = str
|
||||
interactive_prompt = input
|
||||
|
||||
def coerce_string(value): ...
|
||||
def is_string(value): ...
|
||||
|
||||
Reference in New Issue
Block a user