Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feature: Warning/hint for objects coming from siblings/parents/external exposed in __all__ #249

Closed
pawamoy opened this issue Mar 11, 2024 · 0 comments
Assignees
Labels
feature New feature or request

Comments

@pawamoy
Copy link
Member

pawamoy commented Mar 11, 2024

Is your feature request related to a problem? Please describe.

I noticed in my own code that I exposed an object coming from a sibling module in __all__.
I consider this bad practice, and would like a way to warn me if something like this is detected by Griffe.

Describe the solution you'd like

When visiting __all__ assignments or when expanding exports, check that exposed objects were either declared in this module, or in a submodule.

Describe alternatives you've considered

Additional context

@pawamoy pawamoy added the feature New feature or request label Mar 11, 2024
@pawamoy pawamoy self-assigned this Mar 11, 2024
@pawamoy pawamoy closed this as completed Aug 11, 2024
pawamoy added a commit that referenced this issue Aug 14, 2024
…odule instead of the current module or a submodule is exported

Implemented as a DEBUG log for now, waiting for a logging configuration system.

Issue-249: #249
Related-to-PR-251: #251
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant