Forbid transitive imports
See original GitHub issueHi!
I am thing about if this is on scope of this project. I really dislike transitive imports in my projects.
Like:
# module.py
from a import b
And then:
from module import b # ???
What do you think about it?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Should webpack forbid directly importing transitive ... - GitHub
Directly depending on a transitive dependencies is bad practice and as far as I know, there isn't a use case for it. Forbidding...
Read more >disallow import of some transitive maven dependencies
How to disallow import and use of some transitive maven dependencies? So that code will not be accessing different layers of our stack....
Read more >Apache Maven Enforcer Built-In Rules – Banned Dependencies
This rule checks the dependencies and fails if any of the matching excludes are found. The following parameters are supported by this rule:....
Read more >Hiding internal product dependencies from consumers in a ...
Implementation‐only imports only prevent a dependency from being ... All dependencies—both direct and transitive—end up in the import and ...
Read more >This seems more suitable to a capability-based security model ...
The reason to disallow importing transitive dependencies is that we can write packages which use that functionality, but only expose a safer/restricted form ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It would be awesome to have this contract. Something like this:
It really helps to untangle your module dependencies and forces you to refactor better. I know that my project contains a lot of transitive imports, but I just can’t find them by my eyes.
Sad, that it is not on the roadmap. I hope that other users will support me here: it should be! 🙂
(For anyone interested in this, please, put 👍 icon to this reply)
Great, thanks @sobolevn!