Skip to content

Fix mypy errors #1166

@linear

Description

@linear

In #1154

dimos/msgs/sensor_msgs/CameraInfo.py:465: error: Unexpected keyword argument "parent_frame" for "Transform3D"  [call-arg]
/usr/local/lib/python3.10/dist-packages/rerun_sdk/rerun/archetypes/transform3d_ext.py:22: note: "Transform3D" defined here
dimos/msgs/geometry_msgs/Transform.py:374: error: Unexpected keyword argument "parent_frame" for "Transform3D"  [call-arg]
/usr/local/lib/python3.10/dist-packages/rerun_sdk/rerun/archetypes/transform3d_ext.py:22: note: "Transform3D" defined here
dimos/msgs/geometry_msgs/Transform.py:374: error: Unexpected keyword argument "child_frame" for "Transform3D"  [call-arg]
dimos/manipulation/planning/world/drake_world.py:809: error: Returning Any from function declared to return "ndarray[Any, dtype[floating[_64Bit]]]"  [no-any-return]
dimos/manipulation/planning/world/drake_world.py:809: note: Error code "no-any-return" not covered by "type: ignore" comment

On dev:

dimos/models/depth/metric3d.py:176: error: Unsupported operand types for / ("None" and "float")  [operator]
dimos/models/depth/metric3d.py:178: error: Item "None" of "ndarray[Any, dtype[integer[Any] | floating[Any]]] | None" has no attribute "shape"  [union-attr]
dimos/models/depth/metric3d.py:180: error: Unsupported operand types for < ("float" and "None")  [operator]
dimos/models/depth/metric3d.py:181: error: Value of type "ndarray[Any, dtype[integer[Any] | floating[Any]]] | None" is not indexable  [index]
dimos/models/depth/metric3d.py:81: error: Value of type "ndarray[Any, dtype[integer[Any] | floating[Any]]] | None" is not indexable  [index]
dimos/models/segmentation/edge_tam.py:39: error: Cannot find implementation or library stub for module named "sam2.sam2_video_predictor"  [import-not-found]
dimos/perception/detection/type/detection2d/imageDetections2D.py:28: error: Cannot find implementation or library stub for module named "ultralytics.engine.results"  [import-not-found]
dimos/perception/detection/type/detection2d/seg.py:187: error: Value of type "integer[Any] | floating[Any]" is not indexable  [index]
dimos/perception/detection/type/detection2d/seg.py:31: error: Cannot find implementation or library stub for module named "ultralytics.engine.results"  [import-not-found]
dimos/protocol/pubsub/benchmark/testdata.py:216: error: Module "sensor_msgs.msg" does not explicitly export attribute "Image"  [attr-defined]
dimos/protocol/pubsub/benchmark/testdata.py:220: error: Call to untyped function "QoSProfile" in typed context  [no-untyped-call]
dimos/protocol/pubsub/benchmark/testdata.py:233: error: Call to untyped function "QoSProfile" in typed context  [no-untyped-call]
dimos/protocol/pubsub/benchmark/testdata.py:250: error: Incompatible types in assignment (expression has type "ndarray[tuple[int, ...], dtype[unsignedinteger[_8Bit]]]", variable has type "ndarray[tuple[int], dtype[unsignedinteger[_8Bit]]]")  [assignment]
dimos/protocol/pubsub/benchmark/testdata.py:254: error: Incompatible types in assignment (expression has type "ndarray[tuple[int, ...], dtype[unsignedinteger[_8Bit]]]", variable has type "ndarray[tuple[int], dtype[unsignedinteger[_8Bit]]]")  [assignment]
dimos/protocol/pubsub/benchmark/testdata.py:257: error: Call to untyped function "Image" in typed context  [no-untyped-call]
dimos/protocol/pubsub/benchmark/testdata.py:283: error: Call to untyped function "QoSProfile" in typed context  [no-untyped-call]
dimos/protocol/pubsub/benchmark/testdata.py:296: error: Call to untyped function "QoSProfile" in typed context  [no-untyped-call]
dimos/protocol/pubsub/impl/rospubsub.py:107: error: Call to untyped function "QoSProfile" in typed context  [no-untyped-call]
dimos/protocol/pubsub/impl/rospubsub.py:123: error: Module "rclpy" does not explicitly export attribute "ok"  [attr-defined]
dimos/protocol/pubsub/impl/rospubsub.py:163: error: Call to untyped function "destroy_node" in typed context  [no-untyped-call]
dimos/spec/utils.py:18: error: Cannot find implementation or library stub for module named "annotation_protocol"  [import-not-found]
dimos/utils/docs/doclinks.py:521: error: Cannot find implementation or library stub for module named "watchdog.events"  [import-not-found]
dimos/utils/docs/doclinks.py:522: error: Cannot find implementation or library stub for module named "watchdog.observers"  [import-not-found]
dimos/utils/docs/doclinks.py:532: error: Class cannot subclass "FileSystemEventHandler" (has type "Any")  [misc]

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