Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy C committed Dec 20, 2024
1 parent 5db1917 commit e8e3cba
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions vendor/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@
except ImportError:
import collections as collections_abc # Fallback for PY3.2.

# MINIMAL OILS PATCH - stub out 'unicode' type, because the legacy OVM build
# doesn't have it, and it is hard to undo the build hacks.
# Should be type(u''), but type('') runs under OVM, and doesn't appear to break
# type checking.
# MINIMAL OILS PATCH - stub out 'unicode' builtin, because the legacy OVM build
# doesn't have unicodeobject.c, and it is hard to undo the build hacks.
#
# It should be type(u''), but type('') runs under OVM, and doesn't appear to
# break type checking.
unicode = type('')

# Please keep __all__ alphabetized within each category.
Expand Down Expand Up @@ -87,8 +88,7 @@
'NoReturn',
'overload',
'runtime_checkable',
# OILS PATCH
# 'Text',
'Text',
'TYPE_CHECKING',
]

Expand Down Expand Up @@ -785,9 +785,7 @@ def __subclasscheck__(self, cls):

# A useful type variable with constraints. This represents string types.
# (This one *is* for export!)
#AnyStr = TypeVar('AnyStr', bytes, unicode)
# OILS PATCH to remove unicode
AnyStr = TypeVar('AnyStr', bytes, bytes)
AnyStr = TypeVar('AnyStr', bytes, unicode)


def _replace_arg(arg, tvars, args):
Expand Down Expand Up @@ -2380,9 +2378,8 @@ def new_type(x):
return new_type


# OILS PATCH
# Python-version-specific alias (Python 2: unicode; Python 3: str)
# Text = unicode
Text = unicode


# Constant that's True when type checking, but False here.
Expand Down

0 comments on commit e8e3cba

Please sign in to comment.