Git Product home page Git Product logo

Comments (3)

Jasha10 avatar Jasha10 commented on September 25, 2024 1

I was going to suggest that you showed them the output of autoflake -c script.py but it looks like it's not a good idea, unless you want to open another issue xD

Haha! Yes, that's strange indeed :)
Both autoflake -c script.py and even autoflake script.py seem to be no-ops.

Anyway, I've opened an issue against autoflake: PyCQA/autoflake#109.

If it's critical for you...

It's not super critical -- I'm happy to wait until we hear back from the autoflake folks :P

from autoimport.

lyz-code avatar lyz-code commented on September 25, 2024

Hi @Jasha10 thanks as always for opening the issue. I was able to reproduce the bug, although I think the solution should be done in the upstream library we use to detect import errors. We blindly trust autoflake to detect import errors, and they are giving a false positive with your code when they shouldn't. If it's critical for you, I'm happy to accept a PR to prevent this issue until it's fixed in autoflake. Although maybe it's easier to use the next snippet that works as expected:

from typing import Literal

var: Literal["* time"] = "* time"

What do you think?

from autoimport.

lyz-code avatar lyz-code commented on September 25, 2024

Weird, I've tried to reproduce the error with autoflake --check script.py but it returns no issues even if you run it on the next snippet:

os.getcwd()

Which should say that os is not imported. Nevertheless autoflake.check is what we use to detect the import errors.

I was going to suggest that you showed them the output of autoflake -c script.py but it looks like it's not a good idea, unless you want to open another issue xD

from autoimport.

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.