From a5c3cb2db1318c09051f01b922274f77840ccbd5 Mon Sep 17 00:00:00 2001 From: Brian Pugh Date: Sun, 27 Nov 2022 15:34:10 -0800 Subject: [PATCH] Have Device inherit from autoregistry.Registry for easier cli usage --- belay/device.py | 3 ++- pyproject.toml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/belay/device.py b/belay/device.py index 899f9bd..d797544 100644 --- a/belay/device.py +++ b/belay/device.py @@ -15,6 +15,7 @@ from pathlib import Path from typing import Callable, Dict, Generator, List, Optional, Set, TextIO, Tuple, Union +from autoregistry import Registry from pathspec import PathSpec from serial import SerialException @@ -404,7 +405,7 @@ class MethodMetadata: kwargs: dict -class Device: +class Device(Registry): """Belay interface into a micropython device. Attributes diff --git a/pyproject.toml b/pyproject.toml index ca5f0c5..f32994c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,6 +29,7 @@ typer = {extras = ["all"], version = "^0.6"} pathspec = "*" tomli = "^2.0.1" httpx = "^0.23.0" +autoregistry = "^0.8.2" [tool.poetry.group.docs.dependencies] sphinx = "~4.5.0"