More request tests added.

development dependencies added to setup.py

fix error in __init__

kind parameter for get_input_list in reqclient now optional.

request tests create/destroy test scenes on setup/teardown.

license, isort, black badges added to readme.
This commit is contained in:
onyx-and-iris
2022-07-30 16:37:07 +01:00
parent 87c4e3cdcd
commit 064a4aa11d
7 changed files with 199 additions and 82 deletions

View File

@@ -1,4 +1,4 @@
from .events import EventClient
from .reqs import ReqClient
__ALL__ = ["ReqClient", "EventsClient"]
__ALL__ = ["ReqClient", "EventClient"]

View File

@@ -17,7 +17,7 @@ class Callback:
return [to_camel_case(fn.__name__[2:]) for fn in self._callbacks]
def trigger(self, event, data):
"""trigger callback on update"""
"""trigger callback on event"""
for fn in self._callbacks:
if fn.__name__ == f"on_{to_snake_case(event)}":
@@ -36,7 +36,7 @@ class Callback:
self._callbacks.append(fns)
def deregister(self, fns: Union[Iterable, Callable]):
"""deregisters a callback from _callbacks"""
"""deregisters callback functions"""
try:
iterator = iter(fns)

View File

@@ -592,7 +592,7 @@ class ReqClient:
}
self.send("SetSceneSceneTransitionOverride", payload)
def get_input_list(self, kind):
def get_input_list(self, kind=None):
"""
Gets a list of all inputs in OBS.