Skip to content

error when using unicode_literals and TypeVar #1926

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
euresti opened this issue Jul 22, 2016 · 1 comment
Closed

error when using unicode_literals and TypeVar #1926

euresti opened this issue Jul 22, 2016 · 1 comment
Assignees
Labels
bug mypy got something wrong

Comments

@euresti
Copy link
Contributor

euresti commented Jul 22, 2016

from __future__ import unicode_literals
from typing import TypeVar

_T = TypeVar("_T")

Yields:

example.py:4: error: TypeVar() expects a string literal as first argument
example.py:4: error: "object" not callable
@gvanrossum
Copy link
Member

FWIW this is only Python 2. I suspect it's easy to fix. A simpler test case would be:

from typing import TypeVar
T = TypeVar(u'T')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong
Projects
None yet
Development

No branches or pull requests

2 participants