question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pep8 doesn't speak to the walrus

See original GitHub issue

Description

Pep8speaks doesn’t like walrus operators.

Expected behavior

Now that we are py3.8+ (#11934), this should not trip up the checker.

Actual behavior

Pep8speaks flags := as invalid syntax.

https://github.com/astropy/astropy/pull/12136#issuecomment-912842320

Steps to Reproduce

Push code with a := to astropy.

System Details

N/A.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
bsipoczcommented, Sep 8, 2021

flake8 does much more than pycodestyle so there shouldn’t be a downgrade switch, the early adoption of walrus doesn’t worth it imo. For cases like this, do patch upstream.

1reaction
pllimcommented, Sep 8, 2021

So a walrus in the codebase wouldn’t make future PRs error, right?

Theoretically, no.

Read more comments on GitHub >

github_iconTop Results From Across the Web

python - PEP8 plugin breaks my Type Hint code in Sublime 3
Your linter sounds like it is rather out of date, as it neither recognizes the walrus operator := or your type annotations.
Read more >
PEP 572: The Walrus Operator - Dustin Ingram
A discussion about a highly controversial proposed change to Python syntax, the rationale for it, and the resulting fallout.
Read more >
PEP 8 style guide and walrus operator conflict - YouTrack
The new walrus operator in Python 3.8, := will always violate the PEP 8 style guide as there is no space after the...
Read more >
PEP 8 – Style Guide for Python Code
E.g. from M import * does not import objects whose names start with an underscore. single_trailing_underscore_ : used by convention to avoid ...
Read more >
AutoPEP8 - Packages
Note: The walrus( if thing := foo.bar.baz: pass ) operator is not supported. Auto-formatting is running by SublimeText python interpreter, which is locked...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found