-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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(types): Use typing.SupportsInt
and typing.SupportsFloat
#5540
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
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.
Interesting addition.
You might be still working on this, but I left some comments.
Is the change in attr_with_type_hint
related to the issue this PR fixes or is this a fix for another issue introduces by my changes from adding io_name
?
Were there any failing tests for that or have you added some?
If not, adding tests would be great. (I have not gone through all the test_...
changes yet).
Yes this more related to the |
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
@timohl One other thing that came up is what to do about bool. Since the bool caster also works and there is no typing.SupportsBool. The common suggestions are use the |
Signed-off-by: Michael Carlstrom <rmc@carlstrom.com>
Description
Since int and floats by default can convert from
__int__
and__float__
probably mark the input type.Closes #5158
Suggested changelog entry: