Skip to content

Pylance: type UAV CV array helpers #226

Description

@ethayu

Problem

The integrated workspace Pyright pass reports CV helper diagnostics around OpenCV array types and real nullable/unbound paths:

  • contour arrays passed through OpenCV helpers without normalization
  • HSV tuple bounds passed where OpenCV stubs expect array-like values
  • connectedComponentsWithStats called with positional connectivity that Pyright reads as labels
  • debug visualization images possibly unbound
  • debug-only image reads/decode paths not guarded before processing

Acceptance

  • The focused Pyright slice for uav/cv/tracking.py, threshold.py, confidence.py, and dlz_color_regions.py is clean.
  • The touched files pass python3 -m compileall, ruff check, and ruff format --check.
  • The existing DLZ CV test passes.

Parent tracker: #201

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions