A modern platform for visual, flexible, and extensible graph-based investigations. For cybersecurity analysts and investigators.
fix(mypy): relax disallow_untyped_defs for tests across all packages
dextmorgnb1a62522195f
diff --git a/flowsint-api/pyproject.toml b/flowsint-api/pyproject.tomlindex b4020afc..f24207d1 100644--- a/flowsint-api/pyproject.toml+++ b/flowsint-api/pyproject.toml@@ -56,3 +56,9 @@ python_version = "3.11"warn_return_any = truewarn_unused_configs = truedisallow_untyped_defs = true++# See the matching override's rationale in flowsint-core/pyproject.toml:+# pytest fixture params aren't worth fully annotating for test-only code.+[[tool.mypy.overrides]]+module = "tests.*"+disallow_untyped_defs = falsediff --git a/flowsint-api/tests/__init__.py b/flowsint-api/tests/__init__.pynew file mode 100644index 00000000..e69de29bdiff --git a/flowsint-core/pyproject.toml b/flowsint-core/pyproject.tomlindex 2b2c66f0..01347865 100644--- a/flowsint-core/pyproject.toml+++ b/flowsint-core/pyproject.toml@@ -59,6 +59,13 @@ disallow_untyped_defs = true# Test fixtures (MockEnricher etc.) use the same InputType/OutputType# class-attribute pattern real enrichers do — see the matching override# and its rationale in flowsint-enrichers/pyproject.toml.+#+# disallow_untyped_defs off for tests: pytest fixture params carry types+# from conftest.py fixtures scattered across the tree, not the function+# signature — fully annotating every test function's fixture params for+# marginal safety on non-public test code isn't worth the churn. src/+# stays strict; this is a deliberate, scoped relaxation, not a blanket one.[[tool.mypy.overrides]]module = "tests.*"disable_error_code = ["valid-type", "attr-defined", "name-defined"]+disallow_untyped_defs = falsediff --git a/flowsint-enrichers/pyproject.toml b/flowsint-enrichers/pyproject.tomlindex f0bcca7d..2c7c6348 100644--- a/flowsint-enrichers/pyproject.toml+++ b/flowsint-enrichers/pyproject.toml@@ -69,3 +69,9 @@ disallow_untyped_defs = true[[tool.mypy.overrides]]module = "flowsint_enrichers.*"disable_error_code = ["valid-type", "attr-defined", "name-defined"]++# See the matching override's rationale in flowsint-core/pyproject.toml:+# pytest fixture params aren't worth fully annotating for test-only code.+[[tool.mypy.overrides]]+module = "tests.*"+disallow_untyped_defs = falsediff --git a/flowsint-types/pyproject.toml b/flowsint-types/pyproject.tomlindex 3500be5f..feddf1b3 100644--- a/flowsint-types/pyproject.toml+++ b/flowsint-types/pyproject.toml@@ -30,3 +30,9 @@ python_version = "3.11"warn_return_any = truewarn_unused_configs = truedisallow_untyped_defs = true++# See the matching override's rationale in flowsint-core/pyproject.toml:+# pytest fixture params aren't worth fully annotating for test-only code.+[[tool.mypy.overrides]]+module = "tests.*"+disallow_untyped_defs = false