refactor: remove redundant comments and docstrings (#6527)
* refactor: remove redundant comments and docstrings * fix(signal): annotate async context manager as a generator
This commit is contained in:
1 parent
cb3ba45317
commit
a4d2430140
922 files changed
+406
-7738
No files matched your search
@@ -1,5 +1,3 @@
|
||||
"""Local trigger support."""
|
||||
|
||||
from nanobot.triggers.local_store import (
|
||||
LocalTriggerStore,
|
||||
TriggerDisabledError,
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
"""Gateway delivery loop for local triggers."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
"""Shared metadata helpers for local trigger session turns."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any, Mapping
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
"""Workspace-scoped local trigger store and delivery queue."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
"""Coordination for local trigger turns."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Awaitable, Callable, Iterable
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
"""Persistent types for local triggers."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass, field
|
||||
@@ -12,12 +10,10 @@ TriggerStatus = Literal["ok", "error"]
|
||||
|
||||
|
||||
def _int_or_zero(value: Any) -> int:
|
||||
"""Coerce a stored JSON numeric, using zero for null or empty values."""
|
||||
return 0 if value is None or value == "" else int(value)
|
||||
|
||||
|
||||
def _optional_int(value: Any) -> int | None:
|
||||
"""Coerce a stored JSON numeric; null/blank stays None."""
|
||||
if value is None or value == "":
|
||||
return None
|
||||
return int(value)
|
||||
|
||||
Reference in new issue
Block a user