Fixed ruff and mypy lint issues.
Format / ruff (push) Successful in 15s
Lint / ruff (push) Successful in 15s
Unit Tests / pytest (push) Successful in 17s
Type Check / mypy (push) Successful in 23s

This commit is contained in:
2026-02-16 09:40:18 -05:00
parent fce31737f6
commit cb04899d6f
4 changed files with 28 additions and 39 deletions
+24 -34
View File
@@ -110,57 +110,47 @@ from .routes import (
from .storage import ModuleStorage, StorageError from .storage import ModuleStorage, StorageError
__all__ = [ __all__ = [
# Events.
"ChatEvent", "ChatEvent",
"Event",
"EventContext",
"EventHandler",
"EventType",
"NameChangedEvent",
"StreamStartedEvent",
"StreamStoppedEvent",
"StreamTitleUpdatedEvent",
"UserJoinedEvent",
"UserPartedEvent",
"VisibilityUpdateEvent",
# Commands.
"CommandContext", "CommandContext",
"CommandEvent", "CommandEvent",
"CommandHandler", "CommandHandler",
"CommandInfo", "CommandInfo",
"on_command", "Event",
# Routes. "EventContext",
"RouteContext", "EventHandler",
"RouteHandler", "EventType",
"RouteInfo", "ExternalAction",
"on_route", "HttpClient",
# Lifecycle.
"LifecycleHandler", "LifecycleHandler",
"on_event",
"on_setup",
"on_teardown",
# Context.
"ModuleContext",
# Module-scoped service wrappers.
"ModuleCommands", "ModuleCommands",
"ModuleConfig",
"ModuleContext",
"ModuleEvents", "ModuleEvents",
"ModuleRoutes", "ModuleRoutes",
# Config.
"ModuleConfig",
# Storage.
"ModuleStorage", "ModuleStorage",
"StorageError", "NameChangedEvent",
# HTTP.
"HttpClient",
# Owncast.
"ExternalAction",
"OwncastAdminClient", "OwncastAdminClient",
"OwncastClient", "OwncastClient",
"OwncastError", "OwncastError",
"Priority", "Priority",
"RouteContext",
"RouteHandler",
"RouteInfo",
"SocialHandle", "SocialHandle",
"StorageError",
"StreamKey", "StreamKey",
"StreamStartedEvent",
"StreamStatus", "StreamStatus",
"StreamStoppedEvent",
"StreamTitleUpdatedEvent",
"User", "User",
"UserJoinedEvent",
"UserPartedEvent",
"VideoVariant", "VideoVariant",
"VisibilityUpdateEvent",
"on_command",
"on_event",
"on_route",
"on_setup",
"on_teardown",
] ]
+2 -1
View File
@@ -175,7 +175,8 @@ class ModuleStorage:
:param sql: SELECT statement. :param sql: SELECT statement.
:param parameters: Query parameters. :param parameters: Query parameters.
:return: List of rows as sqlite3.Row objects (support both index and key access). :return: List of rows as sqlite3.Row objects
(support both index and key access).
:raises StorageError: If execution fails. :raises StorageError: If execution fails.
""" """
async with self._connection() as conn: async with self._connection() as conn:
+1 -4
View File
@@ -19,15 +19,12 @@ from .events import EventDispatcher, EventRegistry, ModuleEvents
from .routes import ModuleRoutes, RouteDispatcher, RouteRegistry from .routes import ModuleRoutes, RouteDispatcher, RouteRegistry
__all__ = [ __all__ = [
# Commands.
"CommandDispatcher", "CommandDispatcher",
"CommandRegistry", "CommandRegistry",
"ModuleCommands",
# Events.
"EventDispatcher", "EventDispatcher",
"EventRegistry", "EventRegistry",
"ModuleCommands",
"ModuleEvents", "ModuleEvents",
# Routes.
"ModuleRoutes", "ModuleRoutes",
"RouteDispatcher", "RouteDispatcher",
"RouteRegistry", "RouteRegistry",
+1
View File
@@ -55,6 +55,7 @@ python_version = "3.14"
strict = true strict = true
warn_unreachable = true warn_unreachable = true
explicit_package_bases = true explicit_package_bases = true
exclude = ["tests/"]
[tool.pytest.ini_options] [tool.pytest.ini_options]
asyncio_mode = "auto" asyncio_mode = "auto"