humps
humps copied to clipboard
Add __all__ to __init__
Status
READY
Description
mypy
complains that the symbols don't exist, it says error: Module has no attribute "camelize"; maybe "decamelize"?
. Explicitly exposing all the functions in __all__
correctly signals that all of them are available.
Also, reordered the imports a bit to follow the same pattern for all (-ize function 1, de-ize function 1, ..., is_ function 1, ...).
Impacted Areas in Application
List general components of the application that this PR will affect:
- Typing
@nficano @ificiana any chance you can take a look into this? 🙂
@hasier can you provide something to reproduce the bug?
@hasier can you provide something to reproduce the bug?
Hmm I'm having trouble reproducing this in a clean environment now 🤔 Let me test it a bit more and I'll come back to you.
Got it, tiny project setup to reproduce.
Dependencies:
- Python 3.10
-
pyhumps == 3.7.2
-
mypy == 0.971
main.py
import humps
if __name__ == "__main__":
print(humps.camelize("some_variable"))
$ poetry run mypy main.py --strict
test.py:4: error: Module has no attribute "camelize"; maybe "decamelize"?
alright, I've confirmed the bug, thanks for your contribution! I've approved the changes
@nficano any chance we can get this merged and published in a new release? It'd be great to get rid of the mypy
error 🙂
This was wrongly addressed in PR #277, which is released, and there's a fix for it in PR #281
@nficano @sk- are you planning on merging either this or https://github.com/nficano/humps/pull/281 then? 🙏
@hasier I'm not the maintainer of the project, so I cannot merge either of the PRs.
@nficano could we settle in either #275 or #281 ?
yes, sorry on it 👍