CARVIEW |
Navigation Menu
-
-
Notifications
You must be signed in to change notification settings - Fork 56.2k
Workaround solution for issue #26818 #26826
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
Conversation
Hi @asmorkalov , The pipeline page says, "Service is in degraded state" . Any idea on when it will be up and running... |
Oh, sorry I have mistake. this pull request is not enoght to fix original issue. we have to test with "mypy". |
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.
Squash commits and keep changes only in predefined_types.py
Thank you for your continuous helping.
And If possible, could you fix code indent like Mat ? (I think you can fix to override without reverting commit)
kmtr@kmtr-VMware-Virtual-Platform:~/work/opencv4$ git diff -b 4a4031dc48475ec3354d28a3cdedda57a8913443
diff --git a/modules/python/src2/typing_stubs_generation/predefined_types.py b/modules/python/src2/typing_stubs_generation/predefined_types.py
index c5f49b5122..d32fd9b934 100644
--- a/modules/python/src2/typing_stubs_generation/predefined_types.py
+++ b/modules/python/src2/typing_stubs_generation/predefined_types.py
@@ -54,8 +54,12 @@ _PREDEFINED_TYPES = (
doc="Required length is 2"),
AliasTypeNode.sequence_("Size2f", PrimitiveTypeNode.float_(),
doc="Required length is 2"),
- AliasTypeNode.sequence_("Scalar", PrimitiveTypeNode.float_(),
- doc="Required length is at most 4"),
+ AliasTypeNode.union_(
+ "Scalar",
+ items=(SequenceTypeNode("Scalar", PrimitiveTypeNode.float_()),
+ PrimitiveTypeNode.float_()),
+ doc="Max sequence length is at most 4"
+ ),
AliasTypeNode.sequence_("Point", PrimitiveTypeNode.int_(),
doc="Required length is 2"),
AliasTypeNode.ref_("Point2i", "Point"),
kmtr@kmtr-VMware-Virtual-Platform:~/work/opencv4$ |
Updated predefined_types.py to keep changes only as suggested in opencv#26826 (review) opencv#26826 (comment)
Hi @VadimLevin , As you suggested, I stashed all other changes except for the one suggested here #26826 (comment) for predefined_datatypes.py Also, @Kumataro , as you indicated I kept the indent same as per the one you suggested here #26826 (comment) Thanks for all your help. @VadimLevin could you please have a look and let me know if anything else is needed to be done... @VadimLevin As I newly started to the world of open-source hence I have been pretty much afraid of making any changes that might cause the sys to break, but I believe if the community supports me I would also be able to debug, test and write code in a much more professional manner. Thank You! |
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.
Generated typing/__init__.py
entry:
Scalar = _typing.Union[_typing.Sequence[float], float]
"""Max sequence length is at most 4"""
@VadimLevin , thanks for reviewing and merging the PR. |
Updated predefined_types.py to keep changes only as suggested in opencv#26826 (review) opencv#26826 (comment)
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.