Skip to content

Unsupported type Type #4405

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

Closed
mitar opened this issue Dec 24, 2017 · 2 comments
Closed

Unsupported type Type #4405

mitar opened this issue Dec 24, 2017 · 2 comments

Comments

@mitar
Copy link

mitar commented Dec 24, 2017

For the following program:

import typing

T = typing.TypeVar('T')
L = typing.TypeVar('L', bound='List')

class List(typing.List[T]):
    def __init__(self, iterable: typing.Iterable = ()) -> None:
        super().__init__(iterable)

    def copy(self: L) -> L:
        return type(self)(self)

I get the following error:

test.py: error: Unsupported type Type["L"]

mypy 0.560

I do not see why it here an error?

@ilevkivskyi
Copy link
Member

This is essentially a duplicate of #4300 modulo Tuple -> List. Could you please copy your repro there, and close this one?

@mitar
Copy link
Author

mitar commented Dec 24, 2017

Copied. I am not sure if it is the same though.

@mitar mitar closed this as completed Dec 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants