mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 22:11:54 +08:00
Enable stubtest for six (#6699)
This commit is contained in:
23
stubs/six/@tests/stubtest_allowlist.txt
Normal file
23
stubs/six/@tests/stubtest_allowlist.txt
Normal file
@@ -0,0 +1,23 @@
|
||||
# Problems inherited from the standard library
|
||||
six.BytesIO.readlines
|
||||
six.BytesIO.seek
|
||||
six.StringIO.seek
|
||||
six.StringIO.truncate
|
||||
six.moves.*
|
||||
|
||||
# Implemented using "operator" functions in the implementation
|
||||
six.byte2int
|
||||
six.indexbytes
|
||||
six.get_function_closure
|
||||
six.get_function_code
|
||||
six.get_function_defaults
|
||||
six.get_function_globals
|
||||
six.get_method_function
|
||||
six.get_method_self
|
||||
six.viewitems
|
||||
six.viewkeys
|
||||
six.viewvalues
|
||||
|
||||
# Unclear problems
|
||||
six.Iterator.__init__
|
||||
six.callable
|
||||
@@ -1,3 +1,2 @@
|
||||
version = "1.16.*"
|
||||
python2 = true
|
||||
stubtest = false # TODO: figure out why this is needed
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
from __future__ import print_function
|
||||
|
||||
import builtins
|
||||
import types
|
||||
import unittest
|
||||
from builtins import next as next
|
||||
from collections.abc import Callable, ItemsView, Iterable, Iterator as _Iterator, KeysView, Mapping, ValuesView
|
||||
from functools import wraps as wraps
|
||||
from importlib.util import spec_from_loader as spec_from_loader
|
||||
from io import BytesIO as BytesIO, StringIO as StringIO
|
||||
from typing import Any, AnyStr, NoReturn, Pattern, Tuple, Type, TypeVar, overload
|
||||
from typing_extensions import Literal
|
||||
@@ -30,9 +32,12 @@ binary_type = bytes
|
||||
|
||||
MAXSIZE: int
|
||||
|
||||
def callable(obj: object) -> bool: ...
|
||||
callable = builtins.callable
|
||||
|
||||
def get_unbound_function(unbound: types.FunctionType) -> types.FunctionType: ...
|
||||
def create_bound_method(func: types.FunctionType, obj: object) -> types.MethodType: ...
|
||||
|
||||
create_bound_method = types.MethodType
|
||||
|
||||
def create_unbound_method(func: types.FunctionType, cls: type) -> types.FunctionType: ...
|
||||
|
||||
Iterator = object
|
||||
@@ -87,7 +92,7 @@ def python_2_unicode_compatible(klass: _T) -> _T: ...
|
||||
class _LazyDescr:
|
||||
name: str
|
||||
def __init__(self, name: str) -> None: ...
|
||||
def __get__(self, obj: object | None, type: Type[Any] | None = ...) -> Any: ...
|
||||
def __get__(self, obj: object | None, tp: object) -> Any: ...
|
||||
|
||||
class MovedModule(_LazyDescr):
|
||||
mod: str
|
||||
|
||||
Reference in New Issue
Block a user