StreamFlow Mypy Type Checking
SkillDev toolsThis skill should be used when the user asks to "fix mypy errors", "add type annotations", "fix type checking", "resolve no-untyped-def", "fix mypy type errors", or when working with type hints while respecting StreamFlow's forbidden type constraints (no Any, dict[str, Any], etc.).
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 Type Checking skill
What this skill tells your AI
The instructions your AI receives, as published by alpha-unito/streamflow in .agents/skills/mypy/SKILL.md and read by ahel’s review.
Core Constraint
See AGENTS.md for the authoritative forbidden types list. If a fix requires a forbidden type, DO NOT FIX IT. Skip the error entirely.
Sub-Skills
| Error code | Description | Sub-skill |
|---|---|---|
[no-untyped-def] | Function missing type annotations | StreamFlow Mypy no-untyped-def Fixer skill |
[var-annotated] | Variable missing type annotation | StreamFlow Mypy var-annotated Fixer skill |
General Workflow
- Classify: Can the fix use concrete types only? If NO → skip entirely
- Fix: Add annotations (see sub-skill for patterns)
- Validate — must return no output:
git diff | grep -E "Any\b|MutableMapping\[.*Any|MutableSequence\[.*Any|list\[Any|dict\[.*Any" - Quality check — must pass:
uv run make format-check codespell-check typing - Commit: Load the StreamFlow Git Workflow skill
Allowed Types Quick Reference
- Primitives:
None,bool,int,str,float,bytes - Concrete classes:
Workflow,Connector,Port,Token, etc. - Unions:
str | None,int | bool - Generics:
list[str],dict[str, int],set[Token] - Special:
Self,type[MyClass],Literal["a", "b"]
Prefer Literal over str/int for fixed value sets (statuses, connector types, mode flags).
Broad arguments, narrow returns: parameters use abstract types (Iterable, Sequence, Mapping); return types use concrete types (list, dict, set).
Annotation Patterns
# Always annotate with concrete types
def process(self, workflow: Workflow, config: WorkflowConfig) -> bool: ...
# Self for classmethods
@classmethod
async def load(cls, persistent_id: int) -> Self: ...
# Optional: use X | None, not Optional[X]
def get(self, name: str) -> Connector | None: ...
# Always annotate return types — mypy strict mode requires it
async def close(self) -> None: ...
When in doubt, skip it. Better to leave an error than violate the forbidden types constraint.
See Also
- AGENTS.md — Forbidden types list, mandatory rules
- StreamFlow Git Workflow skill — Commit message format and approval workflow
- StreamFlow Code Style skill — Code style guidelines
Signals
- GitHub stars
- 65
- Forks
- 19
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
streamflow-mypy-type-checking- Source
- github.com/alpha-unito/streamflow