Add type hinting
Opened this issue · 6 comments
staticdev commented
- Add static type checks
- Add dynamic type checks
jayrod commented
Love using the library, works awesome. Question though. Would it be possible to generate an array of questions given a dataclass as input? Or is that way out of scope for this library?
Lonerider2010 commented
As mypy states: Skipping analyzing "inquirer": found module but no type hints or library stubs.
So please tell me what is the status of this issue?
staticdev commented
@Lonerider2010 0% done unfortunatelly. You have options:
- Add to mypy ignore (as I used to do)
- Use a similar typed library (such as prompt-toolkit)
- Contribute with a PR and I will be glad to review it
magmax commented
Sorry, but I think it is not going to be so easy, because there are mutable
types: if you pass a string as default, it will be used, but if you pass a
callable it will be called.
As far as I remember that happens with ar least 2 or 3 different fields.
…--
Sorry for being so brief, but I'm writing you from my mobile.
El jue., 23 jun. 2022 21:32, staticdev ***@***.***> escribió:
@Lonerider2010 <https://github.com/Lonerider2010> 0% done unfortunatelly.
You have options:
1. Add to mypy ignore (as I used to do)
2. Use a similar typed library (such as prompt-toolkit)
3. Contribute with a PR and I will be glad to review it
—
Reply to this email directly, view it on GitHub
<#148 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEOSWWXVWK5YGQIDQDLVN3VQS3WVANCNFSM5K4VRYUQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
Lonerider2010 commented
@magmax Thanks for your reply. According to mutable types: What about Union? Or if nothing else helps, there is still the type hint Any...
So my conclusion is: Adding type hinting to Inquirer would help a lot, definitely not only to me.
Lonerider2010 commented
BTW. the answer to @jayrod's question is of great interest for me, too.