mirror of
https://github.com/reconurge/flowsint.git
synced 2026-11-08 14:35:41 -06:00
Without pydantic's mypy plugin, mypy doesn't understand Field()'s required/optional semantics and flags every pydantic model construction that omits a field with a default as a "missing named argument" false positive (e.g. ASN(asn_str=...) flagged for not passing nodeLabel/number/name/country/description, all of which have defaults). Enabled across all 4 packages — fixes this whole category at once rather than casting/ignoring each constructor call site. Also: Enricher.postprocess's input_data was typed Optional[List[str]], which never matched reality — every subclass's input_data is really List[InputType] (per-subclass, same as results), and one subclass (TemplateEnricher's social-account postprocess) explicitly used List[Any], which is where the mismatch actually surfaced as an override error. Widened to Optional[List[Any]], matching how InputType/OutputType are already treated elsewhere in this class. Also fixed that override's mutable default arg (List[Any] = []). Rest is the same mechanical pattern as the previous commit (implicit- Optional params, dict/list literal annotations) in yaml_loader.py, template_enricher.py's __init__/_detect_type/async_init, and test_template_enricher.py's helper functions. Verified: flowsint-core's 397 tests pass unchanged.