Timothée Mazzucotelli :python: on Nostr: #Python devs, do you often have a submodule and a member with the same name? For ...
#Python devs, do you often have a submodule and a member with the same name?
For example:
- pkg/__init__.py declares `thing = 1`
- pkg also has a `thing.py` submodule
#Griffe does not support that and will ignore the member in such cases, giving priority to the submodule. This limitation has been reported multiple times, and I wanted to fix it, but after having worked on it a bit, I'm quite convinced I shouldn't, and instead should say it's bad practice.
https://github.com/mkdocstrings/griffe/issues/124#issuecomment-1981072243
For example:
- pkg/__init__.py declares `thing = 1`
- pkg also has a `thing.py` submodule
#Griffe does not support that and will ignore the member in such cases, giving priority to the submodule. This limitation has been reported multiple times, and I wanted to fix it, but after having worked on it a bit, I'm quite convinced I shouldn't, and instead should say it's bad practice.
https://github.com/mkdocstrings/griffe/issues/124#issuecomment-1981072243