Skip to content

CV2 stub defines type aliases with circular references #213

Closed
@erictraut

Description

@erictraut

The cv2/__init__.pyi defines several type aliases that are invalid because they refer to themselves. This leaves them Unknown.

Here are a few examples:

VariationalRefinement = _mod_cv2.VariationalRefinement
VideoCapture = _mod_cv2.VideoCapture
VideoWriter = _mod_cv2.VideoWriter

Since _mod_cv2 refers back to this same type stub, these are effectively equivalent to:

VariationalRefinement = VariationalRefinement
VideoCapture = VideoCapture
VideoWriter = VideoWriter

Pyright correctly flags these as errors in the stub. They should be fixed.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions