Skip to content

Commit

Permalink
hit missed files
Browse files Browse the repository at this point in the history
  • Loading branch information
purplenicole730 committed Jan 14, 2025
1 parent 37243bb commit 78f0b84
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/examples/module_step2.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async def close(self):


async def main():
Registry.register_resource_creator(Sensor.SUBTYPE, MySensor.MODEL, ResourceCreatorRegistration(MySensor.new))
Registry.register_resource_creator(Sensor.API, MySensor.MODEL, ResourceCreatorRegistration(MySensor.new))


if __name__ == "__main__":
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/module_step3.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ async def main():
This function creates and starts a new module, after adding all desired resource model.
Resource creators must be registered to the resource registry before the module adds the resource model.
"""
Registry.register_resource_creator(Sensor.SUBTYPE, MySensor.MODEL, ResourceCreatorRegistration(MySensor.new))
Registry.register_resource_creator(Sensor.API, MySensor.MODEL, ResourceCreatorRegistration(MySensor.new))

module = Module.from_args()
module.add_model_from_registry(Sensor.SUBTYPE, MySensor.MODEL)
module.add_model_from_registry(Sensor.API, MySensor.MODEL)
await module.start()


Expand Down
2 changes: 1 addition & 1 deletion src/viam/components/arm/arm.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Arm(ComponentBase):
For more information, see `Arm component <https://docs.viam.com/components/arm/>`_.
"""

SUBTYPE: Final = API(RESOURCE_NAMESPACE_RDK, RESOURCE_TYPE_COMPONENT, "arm") # pyright: ignore [reportIncompatibleVariableOverride]
API: Final = API(RESOURCE_NAMESPACE_RDK, RESOURCE_TYPE_COMPONENT, "arm") # pyright: ignore [reportIncompatibleVariableOverride]

@abc.abstractmethod
async def get_end_position(
Expand Down
2 changes: 1 addition & 1 deletion src/viam/components/gantry/gantry.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Gantry(ComponentBase):
For more information, see `Gantry component <https://docs.viam.com/components/gantry/>`_.
"""

SUBTYPE: Final = API( # pyright: ignore [reportIncompatibleVariableOverride]
API: Final = API( # pyright: ignore [reportIncompatibleVariableOverride]
RESOURCE_NAMESPACE_RDK, RESOURCE_TYPE_COMPONENT, "gantry"
)

Expand Down
2 changes: 1 addition & 1 deletion src/viam/components/generic/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,6 @@ def complex_command(self, arg1, arg2, arg3):
For more information, see `Gantry component <https://docs.viam.com/components/generic/>`_.
"""

SUBTYPE: Final = API( # pyright: ignore [reportIncompatibleVariableOverride]
API: Final = API( # pyright: ignore [reportIncompatibleVariableOverride]
RESOURCE_NAMESPACE_RDK, RESOURCE_TYPE_COMPONENT, "generic"
)
2 changes: 1 addition & 1 deletion src/viam/components/gripper/gripper.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Gripper(ComponentBase):
For more information, see `Gripper component <https://docs.viam.com/components/gripper/>`_.
"""

SUBTYPE: Final = API( # pyright: ignore [reportIncompatibleVariableOverride]
API: Final = API( # pyright: ignore [reportIncompatibleVariableOverride]
RESOURCE_NAMESPACE_RDK, RESOURCE_TYPE_COMPONENT, "gripper"
)

Expand Down
2 changes: 1 addition & 1 deletion src/viam/services/vision/vision.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class Vision(ServiceBase):
For more information, see `Computer Vision service <https://docs.viam.com/services/vision/>`_.
"""

SUBTYPE: Final = API( # pyright: ignore [reportIncompatibleVariableOverride]
API: Final = API( # pyright: ignore [reportIncompatibleVariableOverride]
RESOURCE_NAMESPACE_RDK, RESOURCE_TYPE_SERVICE, "vision"
)

Expand Down
2 changes: 1 addition & 1 deletion tests/mocks/module/gizmo/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
class Gizmo(ComponentBase):
"""Example component to use with the example module."""

SUBTYPE: Final = Subtype("acme", RESOURCE_TYPE_COMPONENT, "gizmo")
API: Final = Subtype("acme", RESOURCE_TYPE_COMPONENT, "gizmo")

@abc.abstractmethod
async def do_one(self, arg1: str, **kwargs) -> bool: ...
Expand Down

0 comments on commit 78f0b84

Please sign in to comment.