Skip to content

[pyflakes] Improve invalid-print-syntax documentation - #11171

Merged
charliermarsh merged 1 commit into
astral-sh:mainfrom
JelleZijlstra:invalid-print
Apr 27, 2024
Merged

charliermarsh merged 1 commit into
astral-sh:mainfrom
JelleZijlstra:invalid-print

Conversation

@JelleZijlstra

Copy link
Copy Markdown
Collaborator

This syntax wasn't "deprecated" in Python 3; it was removed.

I started looking at this rule because I was curious how Ruff could even
detect this without a Python 2 parser. Then I realized that
"print >> f, x" is actually valid Python 3 syntax: it creates a tuple
containing a right-shifted version of the print function.

This syntax wasn't "deprecated" in Python 3; it was removed.

I started looking at this rule because I was curious how Ruff could even
detect this without a Python 2 parser. Then I realized that
"print >> f, x" is actually valid Python 3 syntax: it creates a tuple
containing a right-shifted version of the print function.
@github-actions

Copy link
Copy Markdown
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@charliermarsh charliermarsh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@charliermarsh charliermarsh changed the title [pyflakes] Improve invalid-print-syntax documentation [pyflakes] Improve invalid-print-syntax documentation Apr 27, 2024
@charliermarsh charliermarsh added the documentation Improvements or additions to public-facing documentation label Apr 27, 2024
@charliermarsh
charliermarsh merged commit 59b73fa into astral-sh:main Apr 27, 2024
@JelleZijlstra
JelleZijlstra deleted the invalid-print branch April 27, 2024 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to public-facing documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants