import Callable, Iterable from collections.abs instead of typing.

update tests to reflect changes in the API.

reorganise hatch envs

add black,isort configs to pyproject.toml

add pre-commit config
This commit is contained in:
2025-02-11 09:51:00 +00:00
parent 0fe78197fc
commit 797161a6f2
10 changed files with 94 additions and 41 deletions

View File

@@ -96,10 +96,8 @@ class ObsClient:
auth = base64.b64encode(
hashlib.sha256(
(
secret
+ self.server_hello["d"]["authentication"]["challenge"].encode()
)
secret
+ self.server_hello["d"]["authentication"]["challenge"].encode()
).digest()
).decode()

View File

@@ -1,4 +1,5 @@
from typing import Callable, Iterable, Union
from collections.abc import Callable, Iterable
from typing import Union
from .util import as_dataclass, to_camel_case, to_snake_case

View File

@@ -42,7 +42,7 @@ class ReqClient:
def __str__(self):
return type(self).__name__
def disconnect(self):
self.base_client.ws.close()
@@ -438,7 +438,7 @@ class ReqClient:
def set_record_directory(self, recordDirectory):
"""
Sets the current directory that the record output writes files to.
Sets the current directory that the record output writes files to.
IMPORTANT NOTE: Requires obs websocket v5.3 or higher.
:param recordDirectory: Output directory
@@ -448,7 +448,7 @@ class ReqClient:
"recordDirectory": recordDirectory,
}
return self.send("SetRecordDirectory", payload)
def get_source_active(self, name):
"""
Gets the active and show state of a source