Giter Site home page Giter Site logo

Comments (3)

bmakan avatar bmakan commented on May 25, 2024 2

I've just updated to Python 3.12 and flake8 is crashing due to error in flake8-commas. I'll just uninstall it, but it's possibly a blocker for adding python3.12 support.

Edit: I have since reinitialized venv and the error did not reoccur. Maybe I just missed something the first time.

from wemake-python-styleguide.

VelikiiNehochuha avatar VelikiiNehochuha commented on May 25, 2024 1

same here, I've got the error.

python3.12

pip install wemake-python-styleguide==0.18.0
(venv) ➜  flake8_bug pip freeze
astor==0.8.1
attrs==23.2.0
bandit==1.7.7
darglint==1.8.1
docutils==0.20.1
eradicate==2.3.0
flake8==7.0.0
flake8-bandit==4.1.1
flake8-broken-line==1.0.0
flake8-bugbear==23.12.2
flake8-commas==2.1.0
flake8-comprehensions==3.14.0
flake8-debugger==4.1.2
flake8-docstrings==1.7.0
flake8-eradicate==1.5.0
flake8-isort==6.1.1
flake8-quotes==3.4.0
flake8-rst-docstrings==0.3.0
flake8-string-format==0.3.0
isort==5.13.2
markdown-it-py==3.0.0
mccabe==0.7.0
mdurl==0.1.2
pbr==6.0.0
pep8-naming==0.13.3
pycodestyle==2.11.1
pydocstyle==6.3.0
pyflakes==3.2.0
Pygments==2.17.2
PyYAML==6.0.1
restructuredtext_lint==1.4.0
rich==13.7.0
setuptools==69.1.0
snowballstemmer==2.2.0
stevedore==5.1.0
typing_extensions==4.9.0
wemake-python-styleguide==0.18.0
BLANK = ""
hashmap = {}


def replace_blank_labels(labels: list[str]) -> list[str]:
    for index, label in enumerate(labels):
        if label == BLANK:
            label = hashmap[index]
            hashmap[index] = f"[blank][{label}]"
        else:
            label = hashmap[index]
            hashma[index] = f"[label]{label}]"
Unable to find qualified name for module: sample.py
Traceback (most recent call last):
  File "/Users/vn/venv/bin/flake8", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/vn/venv/lib/python3.12/site-packages/flake8/main/cli.py", line 23, in main
    app.run(argv)
  File "/Users/vn/venv/lib/python3.12/site-packages/flake8/main/application.py", line 198, in run
    self._run(argv)
  File "/Users/vn/venv/lib/python3.12/site-packages/flake8/main/application.py", line 187, in _run
    self.run_checks()
  File "/Users/vn/venv/lib/python3.12/site-packages/flake8/main/application.py", line 103, in run_checks
    self.file_checker_manager.run()
  File "/Users/vn/venv/lib/python3.12/site-packages/flake8/checker.py", line 238, in run
    self.run_serial()
  File "/Users/vn/venv/lib/python3.12/site-packages/flake8/checker.py", line 221, in run_serial
    ).run_checks()
      ^^^^^^^^^^^^
  File "/Users/vn/venv/lib/python3.12/site-packages/flake8/checker.py", line 526, in run_checks
    self.run_ast_checks()
  File "/Users/vn/venv/lib/python3.12/site-packages/flake8/checker.py", line 428, in run_ast_checks
    for line_number, offset, text, _ in runner:
  File "/Users/vn/venv/lib/python3.12/site-packages/flake8_commas/_base.py", line 333, in run
    for error in get_comma_errors(tokens):
  File "/Users/vn/venv/lib/python3.12/site-packages/flake8_commas/_base.py", line 306, in get_comma_errors
    (token.type == COLON and stack[-1].comma == LAMBDA_EXPR)
                             ~~~~~^^^^
IndexError: list index out of range

it works fine with python3.11

from wemake-python-styleguide.

sobolevn avatar sobolevn commented on May 25, 2024

I've changed your issue to be a completely different one, because github is broken and I cannot post new issues for some reason.

from wemake-python-styleguide.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.