StreamFlow Mypy no-untyped-def Fixer
SkillDev toolsThis skill should be used when the user encounters "no-untyped-def" mypy errors, asks to "fix no-untyped-def errors", "add type annotations to functions", or mentions "Function is missing a type annotation". Provides specific workflow for fixing missing type annotations while respecting forbidden type constraints.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the StreamFlow Mypy no-untyped-def Fixer skill
What this skill tells your AI
The instructions your AI receives, as published by alpha-unito/streamflow in .agents/skills/mypy/no-untyped-def/SKILL.md and read by ahel’s review.
Error: [no-untyped-def] — function or method missing type annotations.
Decision Process
For each function: can all parameters and the return type use concrete types?
- YES → fix it
- NO (any type needs
Any,dict[str, Any], etc.) → skip the entire function
Workflow
- Identify errors:
uv run mypy path/to/file.py | grep "no-untyped-def" - Classify each function as FIXABLE or UNFIXABLE (see above)
- Add annotations to FIXABLE functions only
- Validate & commit: Load the StreamFlow Mypy Type Checking skill — General Workflow steps 3–5
Key Patterns
# Simple return types
async def close(self) -> None: ...
def is_ready(self) -> bool: ...
# Literal for fixed value sets (preferred over bare str/int)
def get_status(self) -> Literal["pending", "running", "completed", "failed"]: ...
def set_mode(self, mode: Literal["sync", "async"]) -> None: ...
# Broad arguments, narrow returns
from collections.abc import Iterable, Sequence, Mapping
def process(self, items: Iterable[Token]) -> list[str]: ... # broad arg, narrow return
def validate(self, cfg: Mapping[str, str]) -> bool: ... # read-only dict arg
# Optional
def get_connector(self, name: str) -> Connector | None: ...
# Self for classmethods
@classmethod
async def load(cls, persistent_id: int) -> Self: ...
# TypedDict for structured dicts (avoids dict[str, Any])
class ConnectorConfig(TypedDict):
name: str
enabled: bool
def get_config(self) -> ConnectorConfig: ...
SKIP these — require forbidden types:
def get_config(self): return {"key": self.value} # needs dict[str, Any]
def get_items(self): return [self.id, self.cfg] # needs list[Any]
def save(self): return self.config # MutableMapping[str, Any]
Common abstract argument types: Iterable[T] (iteration only) · Sequence[T] (indexing) · Mapping[K, V] (read-only dict)
If any return path needs a forbidden type, skip the whole function.
See Also
- StreamFlow Mypy Type Checking skill — General workflow, allowed types reference
- AGENTS.md — Forbidden types list, commit approval rule
Signals
- GitHub stars
- 65
- Forks
- 19
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
streamflow-mypy-no-untyped-def-fixer- Source
- github.com/alpha-unito/streamflow