8000 Make it an error to use a class-attribute type var outside a type by sixolet · Pull Request #3105 · python/mypy · GitHub
[go: up one dir, main page]

Skip to content

Make it an error to use a class-attribute type var outside a type #3105

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

Merged
merged 7 commits into from
Apr 3, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Typo fix
  • Loading branch information
sixolet committed Apr 1, 2017
commit 8bfd1a749bff260c0d7028955e9db5fffef9a25f
2 changes: 1 addition & 1 deletion mypy/typeanal.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def analyze_type_alias(node: Expression,
if isinstance(node, RefExpr):
# Note that this misses the case where someone tried to use a
# class-referenced type variable as a type alias. It's easier to catch
# that one in checkmemeber.py
# that one in checkmember.py
if node.kind == UNBOUND_TVAR or node.kind == BOUND_TVAR:
fail_func('Type variable "{}" is invalid as target for type alias'.format(
node.fullname), node)
Expand Down
0