-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add type hints to improve codebase readability and enable static type checking #203
Comments
Hi @Niraj-Kamdar, I am not sure if I got your proposal right. Are you volunteering to add type hints to the project? |
No answers to my question, closing it. |
Hey @mindflayer Sorry for the late reply here. My proposal is for adding type hints in general, I would love to help here though when I get free time but currently, I have too much on my plate to help out with this. I would appreciate if you can keep this issue open so others or me can eventually take this and add type-hints to the mocket. |
@mindflayer Closing this issue signals that
Can you re-open this issue if one or both of these are untrue? |
I am the only maintainer of Mocket, and I think it's worth keeping non-bug issues open only if I am confident it's something I have time for, or at least if I know someone is willing to help with. |
Yes. The only thing that gives me pause about taking on this work is the fact that this issue was closed. Which makes it ambiguous as to whether an annotation PR would be accepted. |
Well, alright then! 👍 |
Hi @Kilo59, are you still planning to continue with this task? |
Hello @mindflayer, i just ran into the same "issue" wanting to have this library typed. I started taking a stab at it, but noticed huge parts of the core are hard to type especially due to how request- and response-types are handled (eg i think typing this library fully requires some heavy-handed refactoring in some areas. I'd be willing to do the work (ensuring to not touch the tests), but I'm wondering if you are open to a PR that does said refactoring in addition to the typing? kind regards |
Hi @betaboon, I am not against things like that, and I see many reasons for wanting type hints added to Mocket, especially for people using it as a framework for writing new mocks. |
cool. I'll start working on a PR and push an early commit showing the direction of refactoring i have in mind, so that you can take a look and think whether you like that direction or not :) |
Sure! Apart from looking like a scary monster, I am not that bad though. :) |
Jokes apart, it makes sense to split it in chunks, and of course I'll do my best to raise concerns as soon as I see what you have in mind. The good thing of adding type hints is the fact that can be done incrementally. |
@mindflayer i just pushed a PR. let's continue discussion there. |
I propose adding type hints to the mocket Python package to enhance code readability and maintainability. Type hints provide several benefits, including improved developer productivity, enhanced code documentation, and the ability to catch potential errors using static type-checking tools like Mypy.
The text was updated successfully, but these errors were encountered: