-
Notifications
You must be signed in to change notification settings - Fork 143
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
feat: runtime type checker created #204
Conversation
Let me know which formatter are you guys using. I have used my default one for now. |
Unittests are working locally but I think there seems to be errors related to invalid types in integration tests. It seems like I have to go through CI log and change relevant test suite. |
There is bug in testing scripts:
As mentioned in log An alternate solution can be auto typecasting in |
@jasonpaulos Can you help here? Thanks! |
Any updates? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Niraj-Kamdar, I apologize for the delay in reviewing. I believe we would be interested in this change if you could make TypeCheck
into a function decorator instead of a base class, since then we could type check more than just __init__
methods.
Additionally, could you refrain from running a formatter in this PR? Soon we will add a formatter to this repo and reformat all the code, but that will happen in a separate PR.
Having it as a class has its own benefits. This will work for nested inheritance because of MRO and I think it's better than decorating every classes out there. I can create a friendly decorator though if you want to type check a particular function. |
Is this technique usable when the argument types or not simple Edit: It does. So I would prefer we avoid the change that made strs stop working in some of the constructors that accept a string or an int for an int parameter. |
Closing due to inactivity |
relates: #179
Same method can be used for
Transaction
class to perform typecheckLet me know if you like the solution and would want me to make the other classes type safe.