Fixed ruff and mypy lint issues.
This commit is contained in:
+24
-34
@@ -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",
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -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:
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
Reference in New Issue
Block a user