Skip to content

Fix py3k #3210

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 1 commit into from
Nov 4, 2019
Merged

Fix py3k #3210

merged 1 commit into from
Nov 4, 2019

Conversation

huguesb
Copy link

@huguesb huguesb commented Oct 21, 2019

Enable syntax errors to properly surface invalid code in py3
porting mode, instead of silently swallowing them and giving
the incorrect impression that the code is valid for py3.

🐛 Bug fix

Closes #2956

@coveralls
Copy link

coveralls commented Oct 21, 2019

Coverage Status

Coverage increased (+0.02%) to 89.872% when pulling 11bbb37 on huguesb:fix-py3k into 96b3892 on PyCQA:master.

Copy link
Contributor

@PCManticore PCManticore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @huguesb ! Left just a minor comment before getting this in.

@@ -748,6 +748,11 @@ def error_mode(self):
def python3_porting_mode(self):
"""Disable all other checkers and enable Python 3 warnings."""
self.disable("all")
# re-enable some errors, or 'print', 'raise', 'async', 'await' will mistakenly lint fine
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use the symbolic names here instead? e.g. fatal, syntax-error and so on.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Enable syntax errors to properly surface invalid code in py3
porting mode, instead of silently swallowing them and giving
the incorrect impression that the code is valid for py3.

Closes pylint-dev#2956
@PCManticore PCManticore merged commit 481be93 into pylint-dev:master Nov 4, 2019
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.

no output for --py3k checker with python3 env
4 participants