Code Monkey home page Code Monkey logo

Comments (5)

tek avatar tek commented on July 1, 2024

I'll try this myself if I find the time, just wanted to write down the idea :)

from jedi.

davidhalter avatar davidhalter commented on July 1, 2024

First, the example you give is not correct, because __all__ only affects star imports: from pkg.mod import *. Because you didn't know this, some of the stuff below might not be intended for you to hear. It's just to gather my thoughts.

That said, it is important to note that star imports are not that important, actually I think you shouldn't use it at all (which you are not saying of course).

I once wanted to check for __all__, but then I noticed, that it is really difficult with numpy, because there are additions on add, etc. So I guess the chance that jedi misses some entries, because understanding array operations is pretty heavy, is just too big for me.
However, if anyone wants to add this feature, the condition is that numpy is still fully functional with jedi.

from jedi.

tek avatar tek commented on July 1, 2024

I'm well aware of how __all__ works ;)
The reason for this feature suggestion is that I want be able to filter out the names that aren't in the public interface, i.e. the names not in __all__. For example, I've got the variable __copyright__ in every file and all names imported into a module always appear in the completion menu. So I think it would be a nice side effect of defining __all__ despite the encouragement on * imports.

from jedi.

davidhalter avatar davidhalter commented on July 1, 2024

Yeah, probably you're right. It could be an option in settings.py! I would probably make it the default. But to do this, numpy has to be taken care of. (It's not on my todo list at the moment, though.)

from jedi.

davidhalter avatar davidhalter commented on July 1, 2024

I'm closing this because of no activity and the lack of interest in the community (I myself am not interest in this option anyway and think that it's hard to do with Jedi).

However if somebody wants to do that. Feel free.

from jedi.

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.