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

Check syntax errors in "# type: ignore[code]" comments #7460

Merged
merged 11 commits into from Sep 27, 2019

Conversation

@JukkaL
Copy link
Collaborator

JukkaL commented Sep 4, 2019

No description provided.

@JukkaL JukkaL requested a review from ilevkivskyi Sep 4, 2019
Copy link
Collaborator

ilevkivskyi left a comment

Thanks, looks good! I have just one comment. Also I would propose to add a test that an empty tag doesn't turn into ignore-all, i.e. only name-defined is ignored with a trailing coma:

def f() -> None: ...
f(x)  # type: ignore [name-defined,]
x = y # type: int # type: ignored [foo]
[out]
main:1: error: syntax error in type comment 'int' [syntax]
main:2: error: syntax error in type comment 'int' [syntax]

This comment has been minimized.

Copy link
@ilevkivskyi

ilevkivskyi Sep 4, 2019

Collaborator

TBH this error is confusing. Is it hard to fix this?

@ilevkivskyi

This comment has been minimized.

Copy link
Collaborator

ilevkivskyi commented Sep 4, 2019

Also wow, you just segfaulted gcc, we should probably report a bug.

@JukkaL

This comment has been minimized.

Copy link
Collaborator Author

JukkaL commented Sep 27, 2019

It's not clear if the gcc segfault is reproducible. It happened in code that I didn't touch in this PR.

@JukkaL JukkaL merged commit 322e94e into master Sep 27, 2019
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@JelleZijlstra JelleZijlstra deleted the errcode-check-syntax branch Sep 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.