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-1981072243Published at
2024-03-06 15:23:43Event JSON
{
"id": "9dc7dc45c967364cf7052abcbaf382f1eee1a9b6093d1f1ee3d0d508b823ada4",
"pubkey": "4631af8c5c386f9f543887d2d607f7d873452af2520bc3095b7a6ea56bbdc715",
"created_at": 1709738623,
"kind": 1,
"tags": [
[
"t",
"python"
],
[
"t",
"Griffe"
],
[
"proxy",
"https://fosstodon.org/users/pawamoy/statuses/112049430414335908",
"activitypub"
]
],
"content": "#Python devs, do you often have a submodule and a member with the same name?\n\nFor example:\n\n- pkg/__init__.py declares `thing = 1`\n- pkg also has a `thing.py` submodule\n\n#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.\n\nhttps://github.com/mkdocstrings/griffe/issues/124#issuecomment-1981072243",
"sig": "2947998f209ceafc9b2c6f49ea143fe2d6c53dcf871eb30c642bac179379412168f69f4c753f77ba6ecc5654e8e07ea45b7ee5f38f41a67c1bdea164acf363ad"
}