Comments (5)
Yep after running pre-commit clean
and recreating the pre-commit environment things work well 👍 Thanks again!
from pycln.
Hi @sondrelg, I checked that out myself, and I found that there was no problem in Pycln regarding the MatchAs statement support, so I tried to get the same error that you've encountered by running Pycln using a Python version < 3.10 (I tried 3.8), luckily, I've encountered the same error, therefore, I believe your problem was that you were running Pycln using a Python version < 3.10.
BTW, Pycln uses Python's ast module to parse the code, so if you use for example Python3.8, which does not support the MatchAs syntax, with a 3.10 syntax, Pycln wouldn't be able to deal with it.
Thanks for being around!
Have a good day!
from pycln.
Actually, I came to the idea of showing Python version when using --version
flag, so instead of outputting only Pycln version:
$ pycln --version
pycln, version 1.2.5
we can also show Python version, for example:
$ pycln --version
pycln v1.2.5, python v3.8
Do you have any thoughts about this idea?
from pycln.
+ please let me know if I'm right/wrong so I can fix/close this issue. (initially, I'll mark it as invalid).
from pycln.
Thanks for the quick response. You're probably right, while my venv is 3.10.2, I'm guessing my pre-commit venv(s) are not. I'll reset and try again when I get a chance in a few hours. Closing in the meantime and will update when I can 👍
from pycln.
Related Issues (20)
- [BUG] fails removing unused import when in a tuple HOT 2
- [FEATURE] Release on conda-forge HOT 4
- Release new version with different upper limit for typer package HOT 3
- [BUG] `UnexpandableImportStar` without `expand-stars` or `expand_stars=true` HOT 3
- [FEATURE] Remove unused explicit imports from modules that (may) have side-effects
- [BUG] References in TypeAlias are not recognized which act as a str HOT 1
- [BUG] inlined with ':' for linters and type checkers HOT 3
- AttributeError: 'str' object has no attribute 'value' HOT 6
- [BUG] Module not found when package installed in editable mode from path HOT 1
- Pathspec dependency is incompatible with djlint HOT 5
- [BUG] Pycln does not preserve the original line-break format (CRLF/LF)
- [BUG] Imports removed from class scopes HOT 1
- [FEATURE] Do not remove explicitly re-exported imports even if unused
- [BUG] `pycln --all` removes an implicit import from a subpackage HOT 1
- [BUG] Imports used in deferred annotations unexpectedly cleaned HOT 2
- [BUG] Cleaning/checking fails with a READ permission error HOT 7
- [BUG] python 3.12 compatibility HOT 8
- [BUG] ImportError: cannot import name '_posix_flavour' from 'pathlib' (Python 3.12 compatibility) HOT 5
- [FEATURE] Python 3.12 types support HOT 3
- [BUG] pyproject.toml is packaged and later installed in site-packages root
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 pycln.