fix: resolve all call-non-callable ty diagnostics across codebase

Replace hasattr() duck-typing with isinstance() checks for DiscordAdapter
in gateway/run.py, add TypedDict for IMAGEGEN_BACKENDS in tools_config.py,
properly type fal_client getattr'd callables in image_generation_tool.py,
fix dict[str, object] → Callable annotation in approval.py, use
isinstance(BaseModel) in web_tools.py, capture _message_handler to local
in base.py, rename shadowed list_distributions parameter in batch_runner.py,
and remove dead queue_message branch.
This commit is contained in:
alt-glitch 2026-04-21 16:00:37 +05:30
parent 971542d254
commit 3eddabf53b
7 changed files with 61 additions and 47 deletions

View file

@ -1130,7 +1130,7 @@ def main(
num_workers: int = 4,
resume: bool = False,
verbose: bool = False,
list_distributions: bool = False,
show_distributions: bool = False,
ephemeral_system_prompt: str = None,
log_prefix_chars: int = 100,
providers_allowed: str = None,
@ -1158,7 +1158,7 @@ def main(
num_workers (int): Number of parallel worker processes (default: 4)
resume (bool): Resume from checkpoint if run was interrupted (default: False)
verbose (bool): Enable verbose logging (default: False)
list_distributions (bool): List available toolset distributions and exit
show_distributions (bool): List available toolset distributions and exit
ephemeral_system_prompt (str): System prompt used during agent execution but NOT saved to trajectories (optional)
log_prefix_chars (int): Number of characters to show in log previews for tool calls/responses (default: 20)
providers_allowed (str): Comma-separated list of OpenRouter providers to allow (e.g. "anthropic,openai")
@ -1190,10 +1190,10 @@ def main(
--prefill_messages_file=configs/prefill_opus.json
# List available distributions
python batch_runner.py --list_distributions
python batch_runner.py --show_distributions
"""
# Handle list distributions
if list_distributions:
if show_distributions:
from toolset_distributions import print_distribution_info
print("📊 Available Toolset Distributions")