Giter VIP home page Giter VIP logo

Comments (3)

fake-name avatar fake-name commented on July 20, 2024 3

@graingert - Why are you commenting on random 1+ year old issues?

Also, this is a refactoring tool, something that jedi specifically doesn't do (at least yet). How is that relevant.

from autoflake.

fake-name avatar fake-name commented on July 20, 2024

Ok, this is slightly more complex then I'd hoped, because the name resolution happens at runtime, not parse-time (derp).

I think it should still be possible, at least for a limited subset of cases (read: no dynamic method lookup/stringization of functions, etc...).

I have a simple script that can walk the AST, and find start imports, and then use a NodeVisitor to walk the AST tree and find all calls (this should probably be extended to constants, too).

It's probably possible to build a list of the exposed functions/constants/etc in each star-imported import, and then use that to try to resolve out locals.

from autoflake.

graingert avatar graingert commented on July 20, 2024

@fake-name it may be better to use https://github.com/davidhalter/jedi

from autoflake.

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.