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

Warn about redundant casts #1705

Merged
merged 1 commit into from
Jun 15, 2016
Merged

Conversation

rwbarton
Copy link
Contributor

@rwbarton rwbarton commented Jun 13, 2016

A cast is considered redundant if the target type of the cast is the
same as the inferred type of the expression. A cast to a supertype
like cast(object, 1) is not considered redundant because such a cast
could be needed to work around deficiencies in type inference.

Fixes #958.

A cast is considered redundant if the target type of the cast is the
same as the inferred type of the expression. A cast to a supertype
like `cast(object, 1)` is not considered redundant because such a cast
could be needed to work around deficiencies in type inference.

Fixes python#958.
@ddfisher ddfisher merged commit 9b71668 into python:master Jun 15, 2016
@ddfisher
Copy link
Collaborator

Looks good!

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

Successfully merging this pull request may close these issues.

2 participants