Skip to content

Fix mypy and ufmt CI failures in sprio module - #50

Merged
luccabb merged 2 commits into
mainfrom
fix-ci-sprio-types
Feb 18, 2026
Merged

Fix mypy and ufmt CI failures in sprio module#50
luccabb merged 2 commits into
mainfrom
fix-ci-sprio-types

Conversation

@luccabb

@luccabb luccabb commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fix sprio_parsed_field type signature using @overload to resolve mypy error with incompatible default (type[str] vs Callable[[str], T])
  • Change raw_data annotation in cli/sprio.py from dict[str, str] to dict[Hashable, Any] to satisfy instantiate_dataclass and get_derived_cluster type signatures (matching the pattern used in client.py)
  • Use dict[str, Any] in test_sprio.py to fix **dict unpacking type errors with SprioRow

Test plan

  • mypy gcm passes (0 errors across 232 files)
  • ufmt check gcm passes (all files formatted)
  • flake8 gcm passes
  • pytest gcm/tests/test_sprio.py passes

- Use @overload for sprio_parsed_field to fix incompatible default
  type (type[str] vs Callable[[str], T])
- Change raw_data annotation to dict[Hashable, Any] to match
  Mapping[Hashable, Any] expected by instantiate_dataclass and
  Mapping[Hashable, str | int] expected by get_derived_cluster
- Use dict[str, Any] in test to fix **dict unpacking type errors
- Fix import ordering (ufmt format)
Some versions of GNU date -f skip invalid lines and exit 0 instead
of failing. Check stderr for error output to detect these cases.
@meta-codesync

meta-codesync Bot commented Feb 14, 2026

Copy link
Copy Markdown

@luccabb has imported this pull request. If you are a Meta employee, you can view this in D93295528.

@luccabb
luccabb merged commit 4241136 into main Feb 18, 2026
36 checks passed
@luccabb
luccabb deleted the fix-ci-sprio-types branch February 18, 2026 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant