PyCQA / pycodestyle

Simple Python style checker in one Python file

Home Page:https://pycodestyle.pycqa.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

E901: not detected in Python 3.12.0

hhatto opened this issue · comments

input a Python code that contains a syntax error as follows:

# inalid.py is invalid python code
def tmp(g):
    g(4)))

    if not True:
        pass
        pass

When running pycodestyle v2.11.0 in a Python 3.11.6 environment, I get the following output:

invalid.py:4:5: E122 continuation line missing indentation or outdented
invalid.py:7:1: E901 TokenError: EOF in multi-line statement

However, when running pycodestyle v2.11.0 in a Python 3.12.0 environment, the output was as follows, and E901 was not detected:

invalid.py:4:5: E122 continuation line missing indentation or outdented

Is this the expected behavior?

Environment

  • Python version: 3.12.0
  • pycodestyle version: 2.11.0

yeah there's unfortunately nothing we can do about this since it now crashes the tokenizer. I reported this during the alpha of 3.12 and it was decided to be too minor to address

I see.
Thanks