mirror of
https://github.com/onyx-and-iris/slobs-cli.git
synced 2026-04-18 15:03:45 +00:00
add ruff config
run files through formatter add dosctrings to satisfy the linter
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
"""Create test scenes in Streamlabs.
|
||||
|
||||
Usage:
|
||||
Run this script as a standalone program to setup the test environment.
|
||||
Requires 'SLOBS_DOMAIN' and 'SLOBS_TOKEN' environment variables to be set.
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
import anyio
|
||||
@@ -6,20 +13,22 @@ from pyslobs import ConnectionConfig, ScenesService, SlobsConnection
|
||||
|
||||
|
||||
async def setup(conn: SlobsConnection):
|
||||
"""Set up test scenes in Streamlabs OBS."""
|
||||
ss = ScenesService(conn)
|
||||
await ss.create_scene("slobs-test-scene-1")
|
||||
await ss.create_scene("slobs-test-scene-2")
|
||||
await ss.create_scene("slobs-test-scene-3")
|
||||
await ss.create_scene('slobs-test-scene-1')
|
||||
await ss.create_scene('slobs-test-scene-2')
|
||||
await ss.create_scene('slobs-test-scene-3')
|
||||
|
||||
conn.close()
|
||||
|
||||
|
||||
async def main():
|
||||
"""Establish connection and set up scenes."""
|
||||
conn = SlobsConnection(
|
||||
ConnectionConfig(
|
||||
domain=os.environ["SLOBS_DOMAIN"],
|
||||
domain=os.environ['SLOBS_DOMAIN'],
|
||||
port=59650,
|
||||
token=os.environ["SLOBS_TOKEN"],
|
||||
token=os.environ['SLOBS_TOKEN'],
|
||||
)
|
||||
)
|
||||
|
||||
@@ -28,5 +37,5 @@ async def main():
|
||||
tg.start_soon(setup, conn)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
if __name__ == '__main__':
|
||||
anyio.run(main)
|
||||
|
||||
Reference in New Issue
Block a user