Code Monkey home page Code Monkey logo

Comments (5)

sondrelg avatar sondrelg commented on June 15, 2024 3

Yep after running pre-commit clean and recreating the pre-commit environment things work well 👍 Thanks again!

from pycln.

hadialqattan avatar hadialqattan commented on June 15, 2024

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.

hadialqattan avatar hadialqattan commented on June 15, 2024

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.

hadialqattan avatar hadialqattan commented on June 15, 2024

+ 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.

sondrelg avatar sondrelg commented on June 15, 2024

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)

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.