mirror of
https://github.com/onyx-and-iris/vban-cmd-python.git
synced 2026-04-18 21:13:30 +00:00
Compare commits
3 Commits
22cc980fc2
...
v2.10.4
| Author | SHA1 | Date | |
|---|---|---|---|
| 6e00ee014c | |||
| d7b73e773a | |||
| ba85373f94 |
13
.pre-commit-config.yaml
Normal file
13
.pre-commit-config.yaml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
repos:
|
||||||
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
|
rev: v2.3.0
|
||||||
|
hooks:
|
||||||
|
- id: check-yaml
|
||||||
|
- id: end-of-file-fixer
|
||||||
|
- id: trailing-whitespace
|
||||||
|
|
||||||
|
- repo: https://github.com/python-poetry/poetry
|
||||||
|
rev: '2.3.2'
|
||||||
|
hooks:
|
||||||
|
- id: poetry-check
|
||||||
|
- id: poetry-lock
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "vban-cmd"
|
name = "vban-cmd"
|
||||||
version = "2.10.3"
|
version = "2.10.4"
|
||||||
description = "Python interface for the VBAN RT Packet Service (Sendtext)"
|
description = "Python interface for the VBAN RT Packet Service (Sendtext)"
|
||||||
authors = [{ name = "Onyx and Iris", email = "code@onyxandiris.online" }]
|
authors = [{ name = "Onyx and Iris", email = "code@onyxandiris.online" }]
|
||||||
license = { text = "MIT" }
|
license = { text = "MIT" }
|
||||||
@@ -91,14 +91,16 @@ target-version = "py310"
|
|||||||
|
|
||||||
[tool.ruff.lint]
|
[tool.ruff.lint]
|
||||||
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
|
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
|
||||||
|
# Enable flake8-errmsg (EM) warnings.
|
||||||
|
# Enable flake8-bugbear (B) warnings.
|
||||||
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
|
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
|
||||||
# McCabe complexity (`C901`) by default.
|
# McCabe complexity (`C901`) by default.
|
||||||
select = ["E4", "E7", "E9", "F"]
|
select = ["E4", "E7", "E9", "EM", "F", "B"]
|
||||||
ignore = []
|
ignore = []
|
||||||
|
|
||||||
# Allow fix for all enabled rules (when `--fix`) is provided.
|
# Allow fix for all enabled rules (when `--fix`) is provided.
|
||||||
fixable = ["ALL"]
|
fixable = ["ALL"]
|
||||||
unfixable = []
|
unfixable = ["B"]
|
||||||
|
|
||||||
# Allow unused variables when underscore-prefixed.
|
# Allow unused variables when underscore-prefixed.
|
||||||
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
|
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import abc
|
|
||||||
import logging
|
import logging
|
||||||
from enum import IntEnum
|
from enum import IntEnum
|
||||||
from functools import cached_property
|
from functools import cached_property
|
||||||
@@ -122,11 +121,6 @@ class FactoryBase(VbanCmd):
|
|||||||
+ f"({self.kind}, ip='{self.ip}', port={self.port}, streamname='{self.streamname}')"
|
+ f"({self.kind}, ip='{self.ip}', port={self.port}, streamname='{self.streamname}')"
|
||||||
)
|
)
|
||||||
|
|
||||||
@property
|
|
||||||
@abc.abstractmethod
|
|
||||||
def steps(self):
|
|
||||||
pass
|
|
||||||
|
|
||||||
@cached_property
|
@cached_property
|
||||||
def configs(self):
|
def configs(self):
|
||||||
self._configs = configs(self.kind.name)
|
self._configs = configs(self.kind.name)
|
||||||
|
|||||||
@@ -147,7 +147,4 @@ def deep_merge(dict1, dict2):
|
|||||||
|
|
||||||
def bump_framecounter(framecounter: int) -> int:
|
def bump_framecounter(framecounter: int) -> int:
|
||||||
"""Increment framecounter with rollover at 0xFFFFFFFF."""
|
"""Increment framecounter with rollover at 0xFFFFFFFF."""
|
||||||
if framecounter > 0xFFFFFFFF:
|
return (framecounter + 1) & 0xFFFFFFFF
|
||||||
return 0
|
|
||||||
else:
|
|
||||||
return framecounter + 1
|
|
||||||
|
|||||||
@@ -56,9 +56,10 @@ class VbanCmd(abc.ABC):
|
|||||||
self.producer = None
|
self.producer = None
|
||||||
self._last_script_request_time = 0
|
self._last_script_request_time = 0
|
||||||
|
|
||||||
|
@property
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def __str__(self):
|
def steps(self):
|
||||||
"""Ensure subclasses override str magic method"""
|
"""Steps required to build the interface for this Voicemeeter kind"""
|
||||||
|
|
||||||
def _conn_from_toml(self) -> dict:
|
def _conn_from_toml(self) -> dict:
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user