-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
opencv-python stubs #8879
Closed
Closed
opencv-python stubs #8879
Changes from 18 commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
53cbde4
Bump PyInstaller-stubs to 5.5
Avasam 7f6a836
Merge branch 'master' of https://github.com/python/typeshed
Avasam 517bd33
Initial generated cv2 stubs
Avasam 63d7170
Added microsoft/python-type-stubs/cv2
Avasam 1a00677
Set signatures from existing docstrings
Avasam aef1b26
Added https://github.com/microsoft/python-type-stubs/pull/219
Avasam b9224e3
Added https://github.com/microsoft/python-type-stubs/pull/227
Avasam 85f6091
Added https://github.com/microsoft/python-type-stubs/pull/232
Avasam 9fdc94e
Empty docstrings
Avasam 1e3488c
Use the more flexible _Mat (NDArray) for typing
Avasam b72ac55
Fix dts to dst
Avasam 41dba77
Added missing packages + strict types in cv2.gapi
Avasam edfd948
Updated list to Sequence in method args
Avasam 8b35a5a
stricter pyright
Avasam e2c4a41
Fix Flake8
Avasam 7e8b5dd
complete some Incomplete
Avasam 6e5ab28
Removed docstrings
Avasam 9cf3c44
fix pyright test
Avasam 6a03195
Fixed Mat variances
Avasam f75c2f9
fixed cv2.error and cv2.Error
Avasam 7fb76ea
Flake8 and stubtest
Avasam c9431d2
don't return Any with # incomplete method
Avasam 0a688b7
don't return Any with # incomplete method
Avasam 900e731
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 37bb1d1
Class def updates
Avasam ebe36a1
Merge branch 'opencv2' of https://github.com/Avasam/typeshed into ope…
Avasam 06f73ba
Additional comments
Avasam c66b19c
Move _RotatedRect
Avasam 203de26
mypy type: ignore[misc] explanation comment
Avasam 28dc455
Completed generated modules
Avasam ffcfcee
Merge branch 'master' of https://github.com/python/typeshed into opencv2
Avasam bb50269
Fix flake8 warnings
Avasam 22f29a7
Merge branch 'python:main' into opencv2
Avasam 6b35384
Merge branch 'main' of https://github.com/python/typeshed into opencv2
Avasam 6919768
noqa: Y042" has no matching violations
Avasam 6d21d55
Merge branch 'main' into opencv2
AlexWaygood 3b4f9b3
Merge branch 'main' of https://github.com/python/typeshed into opencv2
Avasam bfd370d
Merge branch 'opencv2' of https://github.com/Avasam/typeshed into ope…
Avasam File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Partial files inserted in code when generating config. | ||
cv2.config-?.* | ||
|
||
# Python 2 | ||
cv2.load_config_py2 | ||
|
||
# Specific args and kwargs definition | ||
cv2.GMat.__init__ | ||
cv2.cv2.GMat.__init__ | ||
cv2.mat_wrapper.Mat.__init__ | ||
cv2.mat_wrapper.Mat.__new__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Can't bump to 4.6 until https://github.com/opencv/opencv-python/issues/676 is fixed. | ||
version = "4.5.*" | ||
|
||
[tool.stubtest] | ||
ignore_missing_stub = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
BAD_ALIGN: int | ||
BAD_ALPHA_CHANNEL: int | ||
BAD_CALL_BACK: int | ||
BAD_COI: int | ||
BAD_DATA_PTR: int | ||
BAD_DEPTH: int | ||
BAD_IMAGE_SIZE: int | ||
BAD_MODEL_OR_CH_SEQ: int | ||
BAD_NUM_CHANNEL1U: int | ||
BAD_NUM_CHANNELS: int | ||
BAD_OFFSET: int | ||
BAD_ORDER: int | ||
BAD_ORIGIN: int | ||
BAD_ROISIZE: int | ||
BAD_STEP: int | ||
BAD_TILE_SIZE: int | ||
BadAlign: int | ||
BadAlphaChannel: int | ||
BadCOI: int | ||
BadCallBack: int | ||
BadDataPtr: int | ||
BadDepth: int | ||
BadImageSize: int | ||
BadModelOrChSeq: int | ||
BadNumChannel1U: int | ||
BadNumChannels: int | ||
BadOffset: int | ||
BadOrder: int | ||
BadOrigin: int | ||
BadROISize: int | ||
BadStep: int | ||
BadTileSize: int | ||
GPU_API_CALL_ERROR: int | ||
GPU_NOT_SUPPORTED: int | ||
GpuApiCallError: int | ||
GpuNotSupported: int | ||
HEADER_IS_NULL: int | ||
HeaderIsNull: int | ||
MASK_IS_TILED: int | ||
MaskIsTiled: int | ||
OPEN_CLAPI_CALL_ERROR: int | ||
OPEN_CLDOUBLE_NOT_SUPPORTED: int | ||
OPEN_CLINIT_ERROR: int | ||
OPEN_CLNO_AMDBLAS_FFT: int | ||
OPEN_GL_API_CALL_ERROR: int | ||
OPEN_GL_NOT_SUPPORTED: int | ||
OpenCLApiCallError: int | ||
OpenCLDoubleNotSupported: int | ||
OpenCLInitError: int | ||
OpenCLNoAMDBlasFft: int | ||
OpenGlApiCallError: int | ||
OpenGlNotSupported: int | ||
STS_ASSERT: int | ||
STS_AUTO_TRACE: int | ||
STS_BACK_TRACE: int | ||
STS_BAD_ARG: int | ||
STS_BAD_FLAG: int | ||
STS_BAD_FUNC: int | ||
STS_BAD_MASK: int | ||
STS_BAD_MEM_BLOCK: int | ||
STS_BAD_POINT: int | ||
STS_BAD_SIZE: int | ||
STS_DIV_BY_ZERO: int | ||
STS_ERROR: int | ||
STS_FILTER_OFFSET_ERR: int | ||
STS_FILTER_STRUCT_CONTENT_ERR: int | ||
STS_INPLACE_NOT_SUPPORTED: int | ||
STS_INTERNAL: int | ||
STS_KERNEL_STRUCT_CONTENT_ERR: int | ||
STS_NOT_IMPLEMENTED: int | ||
STS_NO_CONV: int | ||
STS_NO_MEM: int | ||
STS_NULL_PTR: int | ||
STS_OBJECT_NOT_FOUND: int | ||
STS_OK: int | ||
STS_OUT_OF_RANGE: int | ||
STS_PARSE_ERROR: int | ||
STS_UNMATCHED_FORMATS: int | ||
STS_UNMATCHED_SIZES: int | ||
STS_UNSUPPORTED_FORMAT: int | ||
STS_VEC_LENGTH_ERR: int | ||
StsAssert: int | ||
StsAutoTrace: int | ||
StsBackTrace: int | ||
StsBadArg: int | ||
StsBadFlag: int | ||
StsBadFunc: int | ||
StsBadMask: int | ||
StsBadMemBlock: int | ||
StsBadPoint: int | ||
StsBadSize: int | ||
StsDivByZero: int | ||
StsError: int | ||
StsFilterOffsetErr: int | ||
StsFilterStructContentErr: int | ||
StsInplaceNotSupported: int | ||
StsInternal: int | ||
StsKernelStructContentErr: int | ||
StsNoConv: int | ||
StsNoMem: int | ||
StsNotImplemented: int | ||
StsNullPtr: int | ||
StsObjectNotFound: int | ||
StsOk: int | ||
StsOutOfRange: int | ||
StsParseError: int | ||
StsUnmatchedFormats: int | ||
StsUnmatchedSizes: int | ||
StsUnsupportedFormat: int | ||
StsVecLengthErr: int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from cv2 import data as data, gapi as gapi, mat_wrapper as mat_wrapper, misc as misc, utils as utils, version as version | ||
from cv2.cv2 import * | ||
|
||
__all__: list[str] = [] | ||
|
||
def bootstrap() -> None: ... |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This is a bit weird.
__all__
is empty, but there's nonetheless a bunch of stuff that should be considered re-exported from the module? 🧐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.
__all__
is also empty in the source code and at runtime.If
__all__
is empty, should it be omitted?Btw, cv2 adds a bunch of code and modules dynamically, not sure if that's why they have an empty
__all__
there..