Skip to content
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

Python typing stub generation #20370

Merged
merged 7 commits into from
May 26, 2023
Merged

Python typing stub generation #20370

merged 7 commits into from
May 26, 2023

Conversation

ddacw
Copy link
Contributor

@ddacw ddacw commented Jul 7, 2021

Add stub generation to gen2.py, addressing #14590.

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or other license that is incompatible with OpenCV
  • The PR is proposed to proper branch
  • There is reference to original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

@ddacw
Copy link
Contributor Author

ddacw commented Jul 7, 2021

Generated stub (preview): init.zip

Usage within PyCharm:

screenshot 1

screenshot 2

@VadimLevin
Copy link
Contributor

@vpisarev please have a look at the generated stub file.
There are still several things to do before merge e.g. introducing type aliases for Mat, Size, Rect and etc. and covering some edge cases (mostly in GAPI)

@ddacw
Copy link
Contributor Author

ddacw commented Jul 8, 2021

Current issues:

  • Wrong type for classes with namespace prefix

      class ml_Boost:
          @staticmethod
          def create() -> Boost: ...
          @staticmethod
          def load(filepath: str, nodeName: str = ...) -> Boost: ...
  • Incomplete conversion

    class GInferListOutputs:
      def __init__(self) -> None: ...
      def at(self, name: str) -> GArray<cv_GMat>: ...
  • Output parameter is not included. cv.VideoCapture.retrieve([, image[, flag]]) -> retval, image

       def retrieve(self, flag: int = ...) -> Tuple[int, Mat]: ...

Other todos:

  • Complete the type aliases map.

@ddacw
Copy link
Contributor Author

ddacw commented Jul 21, 2021

Updated stub: init.zip

@ddacw ddacw force-pushed the stub-gen-next branch 3 times, most recently from d25ce61 to f32a16b Compare August 4, 2021 22:32
@ddacw
Copy link
Contributor Author

ddacw commented Aug 5, 2021

Updated stub: init.zip

@ddacw ddacw marked this pull request as ready for review August 12, 2021 21:00
@VadimLevin VadimLevin changed the base branch from next to 3.4 August 16, 2021 11:41
@VadimLevin
Copy link
Contributor

Open issues:

  • Do not convert InputOutputArray to Optional[Mat] if only 1 InputOutputArray argument is present. Example:
@overload
def circle(img: Optional[Mat], center: Point, radius: int, color: Scalar,
           thickness: int = ..., lineType: int = ..., shift: int = ...) -> Mat: ...

should be

@overload
def circle(img: Mat, center: Point, radius: int, color: Scalar,
           thickness: int = ..., lineType: int = ..., shift: int = ...) -> Mat: ...

From the technical point of view - cv2.circle(None, ...) call is valid, but it doesn't make sense.

  • Functions that have name collisions, but belong to different modules should be marked with @overload. Example:
@overload
def resize(src: Mat, dst: Optional[Mat], dsize: Size,
           fx: float = ..., fy: float = ..., interpolation: int = ...) -> Mat: ...
@overload
def resize(src: UMat, dst: Optional[UMat], dsize: Size,
           fx: float = ..., fy: float = ..., interpolation: int = ...) -> UMat: ...

are clashed with G-API module function

def resize(src: GMat, dsize: Sequence[int],
           fx: float = ..., fy: float = ..., interpolation: int = ...) -> GMat: ...

Instead of having 3 overloads to choose from - only the last one is suggested:
image

  • Output arguments should be moved to the end of the required positional arguments list:
@overload
def resize(src: Mat, dst: Optional[Mat], dsize: Size,
           fx: float = ..., fy: float = ..., interpolation: int = ...) -> Mat: ...

with respect to the help(cv2.resize) outputresize(src, dsize[, dst[, fx[, fy[, interpolation]]]]) -> dst. Generated stub should be:

@overload
def resize(src: Mat, dsize: Size,  dst: Optional[Mat] = None,
           fx: float = ..., fy: float = ..., interpolation: int = ...) -> Mat: ...

If argument corresponds to InputOutputArray its position should be preserved e.g. in function normalize.

  • Output arguments with type rather than InputOutputArray or OutputArray should be removed from the API stub:
@overload
def detectMultiScale(self, image: Mat, objects: Optional[Sequence[Rect]] = None,
                     scaleFactor: float = ..., minNeighbors: int = ..., flags: int = ...,
                     minSize: Size = ..., maxSize: Size = ...) -> Sequence[Rect]: ...

should be

@overload
def detectMultiScale(self, image: Mat,
                     scaleFactor: float = ..., minNeighbors: int = ..., flags: int = ...,
                     minSize: Size = ..., maxSize: Size = ...) -> Sequence[Rect]: ...

@ddacw
Copy link
Contributor Author

ddacw commented Aug 16, 2021

Open issues:

  • Do not convert InputOutputArray to Optional[Mat] if only 1 InputOutputArray argument is present. Example:
  • Functions that have name collisions, but belong to different modules should be marked with @overload. Example:
  • Output arguments should be moved to the end of the required positional arguments list:
  • Output arguments with type rather than InputOutputArray or OutputArray should be removed from the API stub:

@asmorkalov asmorkalov added this to the 4.8.0 milestone May 26, 2023
@asmorkalov asmorkalov merged commit a942486 into opencv:4.x May 26, 2023
19 checks passed
@dkurt dkurt mentioned this pull request May 29, 2023
10 tasks
@Avasam
Copy link
Contributor

Avasam commented Jun 5, 2023

Thanks to the artifacts in opencv/opencv-python#853 I've finally been able to download the latest stubs and test them. Just from running type-checking tools on 'em we can immediately seen some missing references (cv2.gapi.ArgType, cv2.gapi.GNetPackage, cv2.gapi.GpuMat and cv2.typing) as well as obsolete types from the typing module instead of collections.abc (it doesn't matter in stubs if this is supporting older python versions, with the exception of position-only args (/) for mypy under python 3.7) :
pyright: pyright --project pyrightconfig.json cv2/__init__.pyi

\cv2\__init__.pyi:4:8 - error: Import "cv2.typing" could not be resolved (reportMissingImports)
\cv2\__init__.pyi:2516:39 - error: "ArgType" is not a known member of module "cv2.gapi" (reportGeneralTypeIssues)    
\cv2\__init__.pyi:2518:32 - error: "ArgType" is not a known member of module "cv2.gapi" (reportGeneralTypeIssues)    
\cv2\__init__.pyi:2523:39 - error: "ArgType" is not a known member of module "cv2.gapi" (reportGeneralTypeIssues)    
\cv2\__init__.pyi:2525:32 - error: "ArgType" is not a known member of module "cv2.gapi" (reportGeneralTypeIssues)    
\cv2\__init__.pyi:2533:38 - error: "GNetPackage" is not a known member of module "cv2.gapi" (reportGeneralTypeIssues)
\cv2\__init__.pyi:4861:40 - error: "GpuMat" is not a known member of module "cv2.cuda" (reportGeneralTypeIssues)

pyrightconfig.json (the stricter settings will report a ton of unknown parameters and types, but let's start with this for now)

{
    "$schema": "https://raw.githubusercontent.com/microsoft/pyright/main/packages/vscode-pyright/schemas/pyrightconfig.schema.json",
    "typeCheckingMode": "strict",
    // Allowed in base settings for incomplete stubs, checked in stricter settings
    "reportIncompleteStub": "none",
    "reportMissingParameterType": "none",
    "reportUnknownMemberType": "none",
    "reportUnknownParameterType": "none",
    "reportUnknownVariableType": "none",
    // Extra strict settings
    "reportCallInDefaultInitializer": "error",
    "reportImplicitStringConcatenation": "error",
    "reportUnnecessaryTypeIgnoreComment": "error",
    // No effect in stubs
    "reportMissingSuperCall": "none",
    "reportUninitializedInstanceVariable": "none",
    // stdlib stubs trigger reportShadowedImports
    "reportShadowedImports": "none",
    // Stubs are allowed to use private variables
    "reportPrivateUsage": "none",
    // Stubs don't need the actual modules to be installed
    "reportMissingModuleSource": "none",
    // Incompatible overrides and property type mismatches are out of typeshed's control
    // as they are inherited from the implementation.
    "reportIncompatibleMethodOverride": "none",
    "reportIncompatibleVariableOverride": "none",
    "reportPropertyTypeMismatch": "none",
    // Overlapping overloads are often necessary in a stub, meaning pyright's check
    // (which is stricter than mypy's; see mypy issue #10143 and #10157)
    // would cause many false positives and catch few bugs.
    "reportOverlappingOverload": "none",
    // The name of the self/cls parameter is out of typeshed's control.
    "reportSelfClsParameterName": "none",
}

mypy: mypy cv2/__init__.pyi (missing py.typed marker is of course a different issue not directly related to the content of the stubs)

cv2/__init__.pyi:1: error: Skipping analyzing "cv2.cuda": module is installed, but missing library stubs or py.typed marker  [import]
cv2/__init__.pyi:3: error: Skipping analyzing "cv2.gapi.streaming": module is installed, but missing library stubs or py.typed marker  [import]
cv2/__init__.pyi:3: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
cv2/__init__.pyi:4: error: Skipping analyzing "cv2.typing": module is installed, but missing library stubs or py.typed marker  [import]
cv2/__init__.pyi:1573: error: Name "cv2.typing.MatLike" is not defined  [name-defined]
cv2/__init__.pyi:1577: error: Name "cv2.typing.MatLike" is not defined  [name-defined]
cv2/__init__.pyi:1614: error: Name "cv2.typing.MatLike" is not defined  [name-defined]
cv2/__init__.pyi:1665: error: Name "cv2.typing.MatLike" is not defined  [name-defined]
cv2/__init__.pyi:1669: error: Name "cv2.typing.Point2f" is not defined  [name-defined]
cv2/__init__.pyi:1684: error: Name "cv2.typing.Point2f" is not defined  [name-defined]
cv2/__init__.pyi:1687: error: Name "cv2.typing.Point2f" is not defined  [name-defined]
cv2/__init__.pyi:1744: error: Name "cv2.typing.Size" is not defined  [name-defined]
cv2/__init__.pyi:1746: error: Name "cv2.typing.Scalar" is not defined  [name-defined]
cv2/__init__.pyi:1748: error: Name "cv2.typing.Size" is not defined  [name-defined]
cv2/__init__.pyi:1748: error: Name "cv2.typing.Scalar" is not defined  [name-defined]
cv2/__init__.pyi:1752: error: Name "cv2.typing.Range" is not defined  [name-defined]
cv2/__init__.pyi:1754: error: Name "cv2.typing.Rect" is not defined  [name-defined]
cv2/__init__.pyi:1756: error: Name "cv2.typing.Range" is not defined  [name-defined]
cv2/__init__.pyi:1759: error: Name "cv2.typing.IntPointer" is not defined  [name-defined]
cv2/__init__.pyi:1762: error: Name "cv2.typing.IntPointer" is not defined  [name-defined]
cv2/__init__.pyi:1764: error: Name "cv2.typing.MatLike" is not defined  [name-defined]
cv2/__init__.pyi:1770: error: Name "cv2.typing.IntPointer" is not defined  [name-defined]
cv2/__init__.pyi:1778: error: Name "cv2.typing.Rect" is not defined  [name-defined]
cv2/__init__.pyi:1780: error: Name "cv2.typing.Rect" is not defined  [name-defined]
cv2/__init__.pyi:1783: error: Name "cv2.typing.Point2f" is not defined  [name-defined]
cv2/__init__.pyi:1785: error: Name "cv2.typing.Point2f" is not defined  [name-defined]
cv2/__init__.pyi:1787: error: Name "cv2.typing.Point2f" is not defined  [name-defined]
cv2/__init__.pyi:1789: error: Name "cv2.typing.Point2f" is not defined  [name-defined]
cv2/__init__.pyi:1791: error: Name "cv2.typing.Vec4f" is not defined  [name-defined]
cv2/__init__.pyi:1795: error: Name "cv2.typing.Vec6f" is not defined  [name-defined]
cv2/__init__.pyi:1797: error: Name "cv2.typing.Point2f" is not defined  [name-defined]
cv2/__init__.pyi:1799: error: Name "cv2.typing.Point2f" is not defined  [name-defined]
cv2/__init__.pyi:1809: error: Name "cv2.typing.Point2f" is not defined  [name-defined]
cv2/__init__.pyi:1811: error: Name "cv2.typing.Point2f" is not defined  [name-defined]
cv2/__init__.pyi:1817: error: Name "cv2.typing.MatLike" is not defined  [name-defined]
cv2/__init__.pyi:1821: error: Name "cv2.typing.MatLike" is not defined  [name-defined]
cv2/__init__.pyi:1826: error: Name "cv2.typing.MatLike" is not defined  [name-defined]
cv2/__init__.pyi:1826: note: (Skipping most remaining errors due to unresolved imports or missing stubs; fix these first)
cv2/__init__.pyi:2002: error: Name "cv2.typing.Size2f" is not defined  [name-defined]
cv2/__init__.pyi:2370: error: Name "cv2.typing.MatLike" is not defined  [name-defined]
cv2/__init__.pyi:2371: error: Name "cv2.typing.MatLike" is not defined  [name-defined]
cv2/__init__.pyi:2372: error: Name "cv2.typing.MatLike" is not defined  [name-defined]
cv2/__init__.pyi:2373: error: Name "cv2.typing.MatLike" is not defined  [name-defined]
cv2/__init__.pyi:2374: error: Name "cv2.typing.MatLike" is not defined  [name-defined]
cv2/__init__.pyi:2375: error: Name "cv2.typing.MatLike" is not defined  [name-defined]
cv2/__init__.pyi:2376: error: Name "cv2.typing.MatLike" is not defined  [name-defined]
cv2/__init__.pyi:2377: error: Name "cv2.typing.MatLike" is not defined  [name-defined]
cv2/__init__.pyi:2378: error: Name "cv2.typing.MatLike" is not defined  [name-defined]
cv2/__init__.pyi:2379: error: Name "cv2.typing.MatLike" is not defined  [name-defined]

Flak8-PYI: flake8 cv2/__init__.pyi --select=Y

cv2/__init__.pyi:1616:37: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1635:23: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1684:28: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1684:72: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1684:103: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1687:27: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1687:149: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1756:41: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1785:29: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1791:30: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1793:37: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1795:34: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1797:40: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1797:71: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1797:87: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1797:125: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1817:91: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1819:63: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1821:30: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1821:74: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1821:127: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1821:143: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1823:30: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1823:60: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1823:99: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1823:115: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1826:61: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1826:143: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1828:47: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1828:115: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1830:31: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1830:79: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1830:95: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1830:136: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1830:195: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1830:211: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1830:239: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1832:31: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1832:65: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1832:81: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1832:122: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1832:167: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1832:183: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1832:211: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1835:174: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1837:132: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1864:33: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1884:61: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1898:67: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1902:64: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1907:63: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1911:60: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1940:26: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1940:94: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1952:100: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1954:120: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1961:96: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:1963:116: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2036:195: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2038:181: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2041:202: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2041:236: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2043:188: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2043:222: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2046:234: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2046:268: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2046:290: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2048:220: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2048:254: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2048:276: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2082:30: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2112:125: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2112:169: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2114:111: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2114:155: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2117:157: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2117:207: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2117:242: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2119:143: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2119:193: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2119:228: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2122:242: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2122:276: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2124:228: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2124:262: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2132:39: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2135:39: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2161:66: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2161:119: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2163:66: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2163:105: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2207:97: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2207:162: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2207:184: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2209:69: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2209:120: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2209:142: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2212:119: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2212:184: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2212:226: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2214:91: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2214:142: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2214:170: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2295:41: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2295:85: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2297:41: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2297:71: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2304:39: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2306:39: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2309:30: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2311:30: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2313:30: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2313:74: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2315:30: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2315:60: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2419:69: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2419:108: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2422:42: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2422:86: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2424:38: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2426:80: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2454:23: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2460:36: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2462:36: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2507:35: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2507:73: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2664:28: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2664:70: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2666:28: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2666:56: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2672:28: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2674:28: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2680:28: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2682:28: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2690:36: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2690:67: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2692:36: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2692:67: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2736:33: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2736:69: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2736:142: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2739:60: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2739:96: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2739:169: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2806:65: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2806:81: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2806:117: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2808:51: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2808:67: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2808:103: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2972:34: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:2972:50: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3046:32: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3048:32: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3050:38: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3061:139: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3063:97: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3065:66: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3065:119: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3067:52: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3067:91: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3070:177: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3070:193: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3072:135: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3072:151: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3074:77: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3074:157: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3074:173: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3076:63: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3076:129: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3076:145: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3079:192: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3079:208: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3081:150: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3081:166: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3083:92: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3083:172: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3083:188: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3085:78: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3085:144: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3085:160: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3363:28: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3363:70: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3365:28: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3365:56: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3367:28: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3367:70: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3369:28: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3369:56: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3430:28: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3432:28: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3434:28: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3436:28: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3442:28: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3444:28: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3446:28: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3448:28: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3466:28: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3468:28: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3470:28: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:3472:28: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4045:104: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4045:275: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4047:90: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4047:247: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4050:29: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4050:76: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4050:132: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4052:29: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4052:62: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4052:104: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4060:22: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4060:69: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4060:127: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4060:157: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4062:22: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4062:55: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4062:99: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4062:129: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4075:35: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4075:85: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4075:223: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4075:280: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4075:445: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4075:482: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4077:35: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4077:71: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4077:167: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4077:210: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4077:333: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4077:356: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4080:43: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4080:93: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4080:231: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4080:288: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4080:617: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4080:654: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4082:43: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4082:79: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4082:175: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4082:218: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4082:463: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4082:486: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4085:37: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4085:87: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4085:243: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4085:300: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4085:512: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4085:549: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4087:37: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4087:73: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4087:187: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4087:230: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4087:386: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4087:409: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4090:45: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4090:95: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4090:251: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4090:308: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4090:741: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4090:778: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4092:45: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4092:81: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4092:195: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4092:238: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4092:559: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4092:582: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4095:38: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4095:91: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4095:142: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4095:193: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4097:38: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4097:77: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4097:114: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4097:151: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4100:45: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4100:95: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4100:148: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4100:201: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4102:45: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4102:81: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4102:120: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4102:159: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4333:85: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4333:149: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4333:208: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4333:272: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4333:309: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4333:346: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4335:57: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4335:107: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4335:152: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4335:202: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4335:225: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4335:248: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4347:32: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4407:55: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4409:41: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4417:57: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4419:43: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4427:55: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4427:120: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4427:160: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4427:306: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4429:41: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4429:92: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4429:132: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4429:264: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4431:55: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4431:120: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4431:160: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4431:329: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4433:41: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4433:92: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4433:132: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4433:287: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4436:58: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4436:123: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4436:163: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4436:179: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4436:326: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4436:342: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4438:44: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4438:95: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4438:135: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4438:151: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4438:284: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4438:300: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4464:122: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4532:54: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4534:40: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4542:47: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4544:47: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4547:40: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4549:40: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4551:40: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4551:129: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4553:40: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4553:115: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4561:44: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4563:30: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4571:57: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4571:103: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4573:57: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4573:89: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4610:79: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4610:214: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4612:65: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4612:172: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4806:31: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4806:113: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4806:147: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4815:18: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4817:18: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4842:62: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4842:127: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4844:48: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4844:113: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4847:57: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4849:43: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4854:38: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4854:121: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4856:62: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4856:145: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4866:61: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4868:47: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4871:38: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4871:83: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4873:38: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4873:69: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4881:38: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4881:88: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4883:38: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:4883:74: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5011:15: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5013:15: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5041:22: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5041:64: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5041:109: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5041:134: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5043:22: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5043:50: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5043:81: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5043:106: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5126:45: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5128:31: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5211:235: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5211:280: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5213:151: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5213:182: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5290:137: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5292:123: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5340:166: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5340:223: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5340:287: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5340:324: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5342:110: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5342:153: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5342:203: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5342:226: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5350:161: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5350:218: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5350:472: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5350:509: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5352:105: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5352:148: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5352:346: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5352:369: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5394:38: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5394:91: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5396:24: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5396:63: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5416:35: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5416:86: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5416:137: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5418:35: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5418:72: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5418:109: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5420:35: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5420:86: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5420:137: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5422:35: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5422:72: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5422:109: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5425:43: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5425:94: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5425:145: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5425:471: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5425:528: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5425:861: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5425:898: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5427:43: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5427:80: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5427:117: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5427:317: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5427:360: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5427:553: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5427:576: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5480:49: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5482:35: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5519:18: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)
cv2/__init__.pyi:5521:18: Y022 Use "collections.abc.Sequence[T]" instead of "typing.Sequence[T]" (PEP 585 syntax)

@Avasam
Copy link
Contributor

Avasam commented Jun 5, 2023

Typing issues found by applying these stubs with existing code:

  • cv2.calcHist: the mask parameter should accept None
  • cv2.resize: the dsize parameter should accept None
  • cv2.Mat is missing in the stub. If that's intentional to promote the use of cv2.typing.MatLike instead, then the cv2.typing module is missing.
  • The class cv2.error is missing from the stubs, it's an important one to catch cv2 errors (along the Error module to filter down errors by code)
  • All other runtime generated modules are missing (for example the Error module which can be imported both with from cv2 import Error and import cv2.Error). Idk if they're just meant to be added later in separate PRs:
    • cv2.cuda, cv2.detail, cv2.dnn, cv2.Error, cv2.fisheye, cv2.flann, cv2.ipp, cv2.load_config_py3, cv2.ml, cv2.ocl, cv2.ogl, cv2.parallel, cv2.samples, cv2.segmentation, cv2.version, cv2.videoio_registry
      • Submodules: cv2.gapi.streaming, cv2.gapi.ie.detail, cv2.gapi.wip.draw, cv2.gapi.wip.gst, cv2.gapi.wip.onevpl, cv2.misc.version

@asmorkalov
Copy link
Contributor

@Avasam Thanks a lot for the trial. opencv/opencv-python#853 is not complete. I'm working on it and plan to get something usable this week. Please submit tickets with found bugs. It's more suitable way to handle it.

@VadimLevin
Copy link
Contributor

@Avasam thanks for checking, some issues are not related directly to OpenCV package content, e.g. mypy has its own logic how to treat typing stub files. (see SO question).

Until opencv-python is not ready, you can build opencv_python3 target form main repo. All stubs should present.

@damonmaria
Copy link

Where and how should we report issues with the typing? It seems all CV_... constants are missing.

@asmorkalov
Copy link
Contributor

please use issue tracker in https://github/opencv/opencv-python

@mhluska
Copy link

mhluska commented Aug 3, 2023

How does one use these type stubs? I've been reading through everything here trying to figure it out but still have no clue.

@asmorkalov
Copy link
Contributor

It's used by IDE for hints and some tools like mypy for static analysis.

@Avasam
Copy link
Contributor

Avasam commented Aug 6, 2023

How does one use these type stubs? I've been reading through everything here trying to figure it out but still have no clue.

If you mean how to install the stubs, they are bundled with opencv-python. However there's a major issue with the cv2.typing module that has been fixed in opencv/opencv-python#870 but not yet published.

thewoz pushed a commit to thewoz/opencv that referenced this pull request Jan 4, 2024
Python typing stub generation opencv#20370

Add stub generation to `gen2.py`, addressing opencv#14590.

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or other license that is incompatible with OpenCV
- [x] The PR is proposed to proper branch
- [x] There is reference to original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
thewoz pushed a commit to thewoz/opencv that referenced this pull request May 29, 2024
Python typing stub generation opencv#20370

Add stub generation to `gen2.py`, addressing opencv#14590.

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or other license that is incompatible with OpenCV
- [x] The PR is proposed to proper branch
- [x] There is reference to original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants