Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors with map #1324

Open
Avasam opened this issue Nov 27, 2022 · 2 comments
Open

Errors with map #1324

Avasam opened this issue Nov 27, 2022 · 2 comments
Labels
bug cat: stubs and 3p type stubs and third-party types

Comments

@Avasam
Copy link

Avasam commented Nov 27, 2022

When trying to use the map class in a type stub, I get the following errors:

  1. pytype.pytd.visitors.SymbolLookupError: Couldn't find map in some.module
    This can be worked around by importing map from builtins: from builtins import map
NotImplementedError: Can't convert <class 'pytype.pytd.pytd.Function'>: Function(name='builtins.map', signatures=(Signature(params=(Parameter(name='function', type=AnythingType(), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, 
mutated_type=None),), starargs=Parameter(name='sequences', type=GenericType(base_type=ClassType(builtins.tuple), parameters=(GenericType(base_type=ClassType(typing.Iterable), parameters=(NothingType(),)),)), kind=<ParameterKind.REGULAR: 'regular'>, optional=True, mutated_type=None), starstarargs=None, return_type=GenericType(base_type=ClassType(typing.Iterator), parameters=(NothingType(),)), exceptions=(), template=()), Signature(params=(Parameter(name='__func', type=CallableType(base_type=ClassType(typing.Callable), parameters=(TypeParameter(name='_T', constraints=(), 
bound=None, scope='builtins.map'), TypeParameter(name='_S', constraints=(), bound=None, scope='builtins.map'))), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None), Parameter(name='__iter1', type=GenericType(base_type=ClassType(typing.Iterable), parameters=(TypeParameter(name='_T', constraints=(), bound=None, scope='builtins.map'),)), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None)), starargs=None, starstarargs=None, return_type=GenericType(base_type=ClassType(typing.Iterator), parameters=(TypeParameter(name='_S', constraints=(), bound=None, scope='builtins.map'),)), exceptions=(), template=(TemplateItem(type_param=TypeParameter(name='_S', constraints=(), bound=None, scope='builtins.map')), TemplateItem(type_param=TypeParameter(name='_T', constraints=(), bound=None, scope='builtins.map')))), Signature(params=(Parameter(name='__func', type=CallableType(base_type=ClassType(typing.Callable), parameters=(TypeParameter(name='_T', constraints=(), bound=None, scope='builtins.map'), TypeParameter(name='_T2', constraints=(), bound=None, scope='builtins.map'), TypeParameter(name='_S', constraints=(), bound=None, scope='builtins.map'))), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None), Parameter(name='__iter1', type=GenericType(base_type=ClassType(typing.Iterable), parameters=(TypeParameter(name='_T', constraints=(), bound=None, scope='builtins.map'),)), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None), Parameter(name='__iter2', type=GenericType(base_type=ClassType(typing.Iterable), parameters=(TypeParameter(name='_T2', constraints=(), bound=None, scope='builtins.map'),)), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None)), starargs=None, starstarargs=None, return_type=GenericType(base_type=ClassType(typing.Iterator), parameters=(TypeParameter(name='_S', constraints=(), bound=None, scope='builtins.map'),)), exceptions=(), template=(TemplateItem(type_param=TypeParameter(name='_S', constraints=(), bound=None, scope='builtins.map')), TemplateItem(type_param=TypeParameter(name='_T', constraints=(), bound=None, scope='builtins.map')), TemplateItem(type_param=TypeParameter(name='_T2', constraints=(), bound=None, scope='builtins.map')))), Signature(params=(Parameter(name='__func', type=CallableType(base_type=ClassType(typing.Callable), parameters=(TypeParameter(name='_T', constraints=(), bound=None, scope='builtins.map'), TypeParameter(name='_T2', constraints=(), bound=None, scope='builtins.map'), TypeParameter(name='_T3', constraints=(), bound=None, scope='builtins.map'), TypeParameter(name='_S', constraints=(), bound=None, scope='builtins.map'))), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None), Parameter(name='__iter1', type=GenericType(base_type=ClassType(typing.Iterable), parameters=(TypeParameter(name='_T', constraints=(), bound=None, scope='builtins.map'),)), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None), Parameter(name='__iter2', type=GenericType(base_type=ClassType(typing.Iterable), parameters=(TypeParameter(name='_T2', constraints=(), bound=None, scope='builtins.map'),)), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None), Parameter(name='__iter3', type=GenericType(base_type=ClassType(typing.Iterable), parameters=(TypeParameter(name='_T3', constraints=(), bound=None, scope='builtins.map'),)), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None)), starargs=None, starstarargs=None, return_type=GenericType(base_type=ClassType(typing.Iterator), parameters=(TypeParameter(name='_S', constraints=(), bound=None, scope='builtins.map'),)), exceptions=(), template=(TemplateItem(type_param=TypeParameter(name='_S', constraints=(), bound=None, scope='builtins.map')), TemplateItem(type_param=TypeParameter(name='_T', constraints=(), bound=None, scope='builtins.map')), TemplateItem(type_param=TypeParameter(name='_T2', constraints=(), bound=None, scope='builtins.map')), TemplateItem(type_param=TypeParameter(name='_T3', constraints=(), bound=None, scope='builtins.map')))), Signature(params=(Parameter(name='__func', type=CallableType(base_type=ClassType(typing.Callable), parameters=(TypeParameter(name='_T', constraints=(), bound=None, scope='builtins.map'), TypeParameter(name='_T2', constraints=(), bound=None, scope='builtins.map'), TypeParameter(name='_T3', constraints=(), bound=None, scope='builtins.map'), TypeParameter(name='_T4', constraints=(), bound=None, scope='builtins.map'), TypeParameter(name='_S', constraints=(), bound=None, scope='builtins.map'))), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None), Parameter(name='__iter1', type=GenericType(base_type=ClassType(typing.Iterable), parameters=(TypeParameter(name='_T', constraints=(), bound=None, scope='builtins.map'),)), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None), Parameter(name='__iter2', type=GenericType(base_type=ClassType(typing.Iterable), parameters=(TypeParameter(name='_T2', constraints=(), bound=None, scope='builtins.map'),)), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None), Parameter(name='__iter3', type=GenericType(base_type=ClassType(typing.Iterable), parameters=(TypeParameter(name='_T3', constraints=(), bound=None, scope='builtins.map'),)), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None), Parameter(name='__iter4', type=GenericType(base_type=ClassType(typing.Iterable), parameters=(TypeParameter(name='_T4', constraints=(), bound=None, scope='builtins.map'),)), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None)), starargs=None, starstarargs=None, return_type=GenericType(base_type=ClassType(typing.Iterator), parameters=(TypeParameter(name='_S', constraints=(), bound=None, scope='builtins.map'),)), exceptions=(), template=(TemplateItem(type_param=TypeParameter(name='_S', constraints=(), bound=None, scope='builtins.map')), TemplateItem(type_param=TypeParameter(name='_T', constraints=(), bound=None, scope='builtins.map')), TemplateItem(type_param=TypeParameter(name='_T2', constraints=(), bound=None, scope='builtins.map')), TemplateItem(type_param=TypeParameter(name='_T3', constraints=(), bound=None, scope='builtins.map')), TemplateItem(type_param=TypeParameter(name='_T4', constraints=(), bound=None, scope='builtins.map')))), Signature(params=(Parameter(name='__func', type=CallableType(base_type=ClassType(typing.Callable), parameters=(TypeParameter(name='_T', constraints=(), bound=None, scope='builtins.map'), TypeParameter(name='_T2', constraints=(), bound=None, scope='builtins.map'), TypeParameter(name='_T3', constraints=(), bound=None, scope='builtins.map'), TypeParameter(name='_T4', constraints=(), bound=None, scope='builtins.map'), TypeParameter(name='_T5', constraints=(), bound=None, scope='builtins.map'), TypeParameter(name='_S', constraints=(), bound=None, scope='builtins.map'))), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None), 
Parameter(name='__iter1', type=GenericType(base_type=ClassType(typing.Iterable), parameters=(TypeParameter(name='_T', constraints=(), bound=None, scope='builtins.map'),)), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None), Parameter(name='__iter2', type=GenericType(base_type=ClassType(typing.Iterable), parameters=(TypeParameter(name='_T2', constraints=(), 
bound=None, scope='builtins.map'),)), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None), Parameter(name='__iter3', type=GenericType(base_type=ClassType(typing.Iterable), parameters=(TypeParameter(name='_T3', constraints=(), bound=None, scope='builtins.map'),)), 
kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None), Parameter(name='__iter4', type=GenericType(base_type=ClassType(typing.Iterable), parameters=(TypeParameter(name='_T4', constraints=(), bound=None, scope='builtins.map'),)), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None), Parameter(name='__iter5', type=GenericType(base_type=ClassType(typing.Iterable), parameters=(TypeParameter(name='_T5', constraints=(), bound=None, scope='builtins.map'),)), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None)), starargs=None, starstarargs=None, return_type=GenericType(base_type=ClassType(typing.Iterator), parameters=(TypeParameter(name='_S', constraints=(), bound=None, scope='builtins.map'),)), exceptions=(), template=(TemplateItem(type_param=TypeParameter(name='_S', constraints=(), bound=None, scope='builtins.map')), TemplateItem(type_param=TypeParameter(name='_T', constraints=(), bound=None, scope='builtins.map')), TemplateItem(type_param=TypeParameter(name='_T2', constraints=(), bound=None, scope='builtins.map')), TemplateItem(type_param=TypeParameter(name='_T3', constraints=(), bound=None, scope='builtins.map')), TemplateItem(type_param=TypeParameter(name='_T4', constraints=(), bound=None, scope='builtins.map')), TemplateItem(type_param=TypeParameter(name='_T5', constraints=(), bound=None, scope='builtins.map')))), Signature(params=(Parameter(name='__func', type=GenericType(base_type=ClassType(typing.Callable), parameters=(AnythingType(), TypeParameter(name='_S', constraints=(), bound=None, scope='builtins.map'))), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None), Parameter(name='__iter1', type=GenericType(base_type=ClassType(typing.Iterable), parameters=(AnythingType(),)), kind=<ParameterKind.REGULAR: 
'regular'>, optional=False, mutated_type=None), Parameter(name='__iter2', type=GenericType(base_type=ClassType(typing.Iterable), parameters=(AnythingType(),)), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None), Parameter(name='__iter3', type=GenericType(base_type=ClassType(typing.Iterable), parameters=(AnythingType(),)), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None), Parameter(name='__iter4', type=GenericType(base_type=ClassType(typing.Iterable), parameters=(AnythingType(),)), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None), Parameter(name='__iter5', type=GenericType(base_type=ClassType(typing.Iterable), parameters=(AnythingType(),)), kind=<ParameterKind.REGULAR: 'regular'>, 
optional=False, mutated_type=None), Parameter(name='__iter6', type=GenericType(base_type=ClassType(typing.Iterable), parameters=(AnythingType(),)), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None)), starargs=Parameter(name='iterables', type=GenericType(base_type=ClassType(builtins.tuple), parameters=(GenericType(base_type=ClassType(typing.Iterable), parameters=(AnythingType(),)),)), kind=<ParameterKind.REGULAR: 'regular'>, optional=True, mutated_type=None), starstarargs=None, return_type=GenericType(base_type=ClassType(typing.Iterator), parameters=(TypeParameter(name='_S', constraints=(), bound=None, scope='builtins.map'),)), exceptions=(), template=(TemplateItem(type_param=TypeParameter(name='_S', constraints=(), bound=None, scope='builtins.map')),))), kind=<MethodKind.METHOD: 'method'>, flags=<MethodFlag.NONE: 1>)
@rchen152 rchen152 added bug cat: stubs and 3p type stubs and third-party types labels Dec 1, 2022
@rchen152
Copy link
Contributor

rchen152 commented Dec 1, 2022

Thanks for the report! Could you give an example of how you're using map that's generating this error?

@Avasam
Copy link
Author

Avasam commented Feb 28, 2024

Hi @rchen152 ! I hit this again in python/typeshed#11455
Here's a permalink to how it was used: https://github.com/python/typeshed/blob/2927d663dc054911b9954eb8356da531d073de2f/stubs/setuptools/pkg_resources/__init__.pyi#L97

And the associated GitHub actions run: https://github.com/python/typeshed/actions/runs/8073594519/job/22057530767?pr=11455

Unfortunately this time adding from builtins import map results in the following very long error to be repeated:

stubs/setuptools/setuptools/package_index.pyi (3.10): pytype.pytd.visitors.SymbolLookupError: Function(name='builtins.map', signatures=(Signature(params=(Parameter(name='function', type=AnythingType(), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None),), starargs=Parameter(name='sequences', type=GenericType(base_type=ClassType(builtins.tuple), parameters=(GenericType(base_type=ClassType(typing.Iterable), parameters=(NothingType(),)),)), kind=<ParameterKind.REGULAR: 'regular'>, optional=True, mutated_type=None), starstarargs=None, return_type=GenericType(base_type=ClassType(typing.Iterator), parameters=(NothingType(),)), exceptions=(), template=()), Signature(params=(Parameter(name='__func', type=CallableType(base_type=ClassType(typing.Callable), parameters=(TypeParameter(name='_T', constraints=(), bound=None, scope='builtins.map'), TypeParameter(name='_S', constraints=(), bound=None, scope='builtins.map'))), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None), Parameter(name='__iter1', type=GenericType(base_type=ClassType(typing.Iterable), parameters=(TypeParameter(name='_T', constraints=(), bound=None, scope='builtins.map'),)), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None)), starargs=None, starstarargs=None, return_type=GenericType(base_type=ClassType(typing.Iterator), parameters=(TypeParameter(name='_S', constraints=(), bound=None, scope='builtins.map'),)), exceptions=(), template=(TemplateItem(type_param=TypeParameter(name='_S', constraints=(), bound=None, scope='builtins.map')), TemplateItem(type_param=TypeParameter(name='_T', constraints=(), bound=None, 
scope='builtins.map')))), Signature(params=(Parameter(name='__func', type=CallableType(base_type=ClassType(typing.Callable), parameters=(TypeParameter(name='_T', constraints=(), bound=None, scope='builtins.map'), TypeParameter(name='_T2', constraints=(), bound=None, scope='builtins.map'), TypeParameter(name='_S', constraints=(), bound=None, scope='builtins.map'))), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None), Parameter(name='__iter1', type=GenericType(base_type=ClassType(typing.Iterable), parameters=(TypeParameter(name='_T', constraints=(), bound=None, scope='builtins.map'),)), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None), Parameter(name='__iter2', type=GenericType(base_type=ClassType(typing.Iterable), parameters=(TypeParameter(name='_T2', constraints=(), bound=None, scope='builtins.map'),)), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None)), starargs=None, starstarargs=None, return_type=GenericType(base_type=ClassType(typing.Iterator), parameters=(TypeParameter(name='_S', constraints=(), bound=None, scope='builtins.map'),)), exceptions=(), template=(TemplateItem(type_param=TypeParameter(name='_S', constraints=(), bound=None, scope='builtins.map')), TemplateItem(type_param=TypeParameter(name='_T', constraints=(), bound=None, scope='builtins.map')), TemplateItem(type_param=TypeParameter(name='_T2', constraints=(), bound=None, scope='builtins.map')))), Signature(params=(Parameter(name='__func', type=CallableType(base_type=ClassType(typing.Callable), parameters=(TypeParameter(name='_T', constraints=(), bound=None, scope='builtins.map'), TypeParameter(name='_T2', constraints=(), bound=None, scope='builtins.map'), TypeParameter(name='_T3', constraints=(), bound=None, scope='builtins.map'), TypeParameter(name='_S', constraints=(), bound=None, scope='builtins.map'))), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None), Parameter(name='__iter1', type=GenericType(base_type=ClassType(typing.Iterable), parameters=(TypeParameter(name='_T', constraints=(), bound=None, scope='builtins.map'),)), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None), Parameter(name='__iter2', type=GenericType(base_type=ClassType(typing.Iterable), parameters=(TypeParameter(name='_T2', constraints=(), bound=None, scope='builtins.map'),)), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None), Parameter(name='__iter3', type=GenericType(base_type=ClassType(typing.Iterable), parameters=(TypeParameter(name='_T3', constraints=(), bound=None, scope='builtins.map'),)), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None)), starargs=None, starstarargs=None, return_type=GenericType(base_type=ClassType(typing.Iterator), parameters=(TypeParameter(name='_S', constraints=(), bound=None, scope='builtins.map'),)), exceptions=(), template=(TemplateItem(type_param=TypeParameter(name='_S', constraints=(), bound=None, scope='builtins.map')), TemplateItem(type_param=TypeParameter(name='_T', constraints=(), bound=None, scope='builtins.map')), TemplateItem(type_param=TypeParameter(name='_T2', constraints=(), bound=None, scope='builtins.map')), TemplateItem(type_param=TypeParameter(name='_T3', constraints=(), bound=None, scope='builtins.map')))), Signature(params=(Parameter(name='__func', type=CallableType(base_type=ClassType(typing.Callable), parameters=(TypeParameter(name='_T', constraints=(), bound=None, scope='builtins.map'), TypeParameter(name='_T2', constraints=(), bound=None, scope='builtins.map'), TypeParameter(name='_T3', constraints=(), bound=None, scope='builtins.map'), TypeParameter(name='_T4', constraints=(), bound=None, scope='builtins.map'), TypeParameter(name='_S', constraints=(), bound=None, scope='builtins.map'))), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None), Parameter(name='__iter1', type=GenericType(base_type=ClassType(typing.Iterable), parameters=(TypeParameter(name='_T', constraints=(), bound=None, scope='builtins.map'),)), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None), Parameter(name='__iter2', type=GenericType(base_type=ClassType(typing.Iterable), parameters=(TypeParameter(name='_T2', constraints=(), bound=None, scope='builtins.map'),)), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None), Parameter(name='__iter3', type=GenericType(base_type=ClassType(typing.Iterable), parameters=(TypeParameter(name='_T3', constraints=(), bound=None, scope='builtins.map'),)), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None), Parameter(name='__iter4', type=GenericType(base_type=ClassType(typing.Iterable), parameters=(TypeParameter(name='_T4', constraints=(), bound=None, scope='builtins.map'),)), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None)), starargs=None, starstarargs=None, return_type=GenericType(base_type=ClassType(typing.Iterator), parameters=(TypeParameter(name='_S', constraints=(), bound=None, scope='builtins.map'),)), exceptions=(), template=(TemplateItem(type_param=TypeParameter(name='_S', constraints=(), bound=None, scope='builtins.map')), TemplateItem(type_param=TypeParameter(name='_T', constraints=(), bound=None, scope='builtins.map')), TemplateItem(type_param=TypeParameter(name='_T2', constraints=(), bound=None, scope='builtins.map')), TemplateItem(type_param=TypeParameter(name='_T3', constraints=(), bound=None, scope='builtins.map')), TemplateItem(type_param=TypeParameter(name='_T4', constraints=(), bound=None, scope='builtins.map')))), Signature(params=(Parameter(name='__func', type=CallableType(base_type=ClassType(typing.Callable), parameters=(TypeParameter(name='_T', constraints=(), bound=None, scope='builtins.map'), TypeParameter(name='_T2', constraints=(), bound=None, scope='builtins.map'), TypeParameter(name='_T3', constraints=(), bound=None, scope='builtins.map'), TypeParameter(name='_T4', constraints=(), bound=None, scope='builtins.map'), TypeParameter(name='_T5', constraints=(), bound=None, scope='builtins.map'), TypeParameter(name='_S', constraints=(), bound=None, scope='builtins.map'))), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None), Parameter(name='__iter1', type=GenericType(base_type=ClassType(typing.Iterable), parameters=(TypeParameter(name='_T', constraints=(), bound=None, scope='builtins.map'),)), kind=<ParameterKind.REGULAR: 
'regular'>, optional=False, mutated_type=None), Parameter(name='__iter2', type=GenericType(base_type=ClassType(typing.Iterable), parameters=(TypeParameter(name='_T2', constraints=(), bound=None, scope='builtins.map'),)), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None), Parameter(name='__iter3', type=GenericType(base_type=ClassType(typing.Iterable), parameters=(TypeParameter(name='_T3', constraints=(), bound=None, scope='builtins.map'),)), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None), Parameter(name='__iter4', type=GenericType(base_type=ClassType(typing.Iterable), parameters=(TypeParameter(name='_T4', constraints=(), bound=None, scope='builtins.map'),)), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None), Parameter(name='__iter5', type=GenericType(base_type=ClassType(typing.Iterable), parameters=(TypeParameter(name='_T5', constraints=(), bound=None, scope='builtins.map'),)), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None)), starargs=None, starstarargs=None, return_type=GenericType(base_type=ClassType(typing.Iterator), parameters=(TypeParameter(name='_S', constraints=(), bound=None, scope='builtins.map'),)), exceptions=(), template=(TemplateItem(type_param=TypeParameter(name='_S', constraints=(), bound=None, scope='builtins.map')), TemplateItem(type_param=TypeParameter(name='_T', constraints=(), bound=None, scope='builtins.map')), TemplateItem(type_param=TypeParameter(name='_T2', constraints=(), bound=None, scope='builtins.map')), TemplateItem(type_param=TypeParameter(name='_T3', constraints=(), bound=None, scope='builtins.map')), TemplateItem(type_param=TypeParameter(name='_T4', constraints=(), bound=None, scope='builtins.map')), TemplateItem(type_param=TypeParameter(name='_T5', constraints=(), bound=None, scope='builtins.map')))), Signature(params=(Parameter(name='__func', type=GenericType(base_type=ClassType(typing.Callable), parameters=(AnythingType(), TypeParameter(name='_S', constraints=(), bound=None, scope='builtins.map'))), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None), Parameter(name='__iter1', type=GenericType(base_type=ClassType(typing.Iterable), parameters=(AnythingType(),)), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None), Parameter(name='__iter2', type=GenericType(base_type=ClassType(typing.Iterable), parameters=(AnythingType(),)), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None), Parameter(name='__iter3', type=GenericType(base_type=ClassType(typing.Iterable), parameters=(AnythingType(),)), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None), Parameter(name='__iter4', type=GenericType(base_type=ClassType(typing.Iterable), parameters=(AnythingType(),)), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None), Parameter(name='__iter5', type=GenericType(base_type=ClassType(typing.Iterable), parameters=(AnythingType(),)), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None), Parameter(name='__iter6', type=GenericType(base_type=ClassType(typing.Iterable), parameters=(AnythingType(),)), kind=<ParameterKind.REGULAR: 'regular'>, optional=False, mutated_type=None)), starargs=Parameter(name='iterables', type=GenericType(base_type=ClassType(builtins.tuple), parameters=(GenericType(base_type=ClassType(typing.Iterable), parameters=(AnythingType(),)),)), kind=<ParameterKind.REGULAR: 'regular'>, optional=True, mutated_type=None), starstarargs=None, return_type=GenericType(base_type=ClassType(typing.Iterator), parameters=(TypeParameter(name='_S', constraints=(), bound=None, scope='builtins.map'),)), exceptions=(), template=(TemplateItem(type_param=TypeParameter(name='_S', constraints=(), bound=None, scope='builtins.map')),))), kind=<MethodKind.METHOD: 'method'>, flags=<MethodFlag.NONE: 1>, decorators=()) is not a type

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cat: stubs and 3p type stubs and third-party types
Projects
None yet
Development

No branches or pull requests

2 participants