Comments (3)
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.
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.
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)
- Ignoring the absence of a new line between methods
- Gihub Action: Unable to process file command 'output' successfully. HOT 2
- Forbid importing the same object with two different names.
- Pydocstyle is no longer maintained HOT 1
- WPS473 is counted lines containing concatenated strings as empty. HOT 1
- False positive WPS441
- Disallow suppressing CancelledError
- def func(): ... causes false positives for WPS220, E704 and WPS473 HOT 6
- WPS508 on negating chain comparison HOT 4
- `self._tokens[1]`: `IndexError: list index out of range`
- Question about WPS324 — Enforce consistent return statements. HOT 2
- How to set up WPS (wemake-python-styleguide) autocheck in PyCharm HOT 1
- Drop `astor` in favour of `ast.unparse`
- Remove usage of deprecated nodes: `ast.Num`, `ast.Str`, `ast.Bytes`, etc
- Better detect literal nodes with `wps_op_eval`
- Do we still need `fix_line_number`?
- Too many exceptions in one `except`
- WPS221 wrong case
- WPS331 should recommend the opposite HOT 2
- Drop the abandoned `flake8-commas` plugin from deps HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wemake-python-styleguide.