diff --git a/examples/xair-obs/__main__.py b/examples/xair-obs/__main__.py index 49aaafa..e3b7499 100644 --- a/examples/xair-obs/__main__.py +++ b/examples/xair-obs/__main__.py @@ -26,10 +26,14 @@ class Observer: print(f"Mute Group 1 is {self._mixer.config.mute_group[0].on}") -if __name__ == "__main__": +def main(): with xair_api.connect("MR18", ip="mixer.local") as mixer: Observer(mixer) while cmd := input(" to exit\n"): if not cmd: break + + +if __name__ == "__main__": + main() diff --git a/pyproject.toml b/pyproject.toml index 0d429df..dc094c8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,3 +21,6 @@ isort = "^5.10.1" [build-system] requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" + +[tool.poetry.scripts] +obs = "examples.xair-obs.__main__:main" diff --git a/xair_api/xair.py b/xair_api/xair.py index 7da229c..b008699 100644 --- a/xair_api/xair.py +++ b/xair_api/xair.py @@ -109,7 +109,7 @@ def _make_remote(kind: KindMap) -> XAirRemote: """ Creates a new XAIR remote class. - The returned class will subclass MAirRemote. + The returned class will subclass XAirRemote. """ def init(self, *args, **kwargs):