Skip to content

Comments

Confirm outdated review comment on _parse_network_input is no longer applicable#587

Closed
Copilot wants to merge 2 commits intojapr/network-supportfrom
copilot/sub-pr-586
Closed

Confirm outdated review comment on _parse_network_input is no longer applicable#587
Copilot wants to merge 2 commits intojapr/network-supportfrom
copilot/sub-pr-586

Conversation

Copy link

Copilot AI commented Feb 20, 2026

  • Run mypy and identify all type errors
  • Fix NodeObservation.node return type to Optional[int]
  • Fix NetworkObservation.nodes list comprehension to filter None values
  • Add None guard in NodeModelResult.node before calling .item()
  • Remove SpatialField inheritance from NetworkModelResult (incompatible extract() signature)
  • Fix matching.py with proper cast() calls and explicit raw_mod_data type
  • Remove NetworkModelResult from raw_mod_data type union in Comparer (after extraction it becomes NodeModelResult)
  • Fix _to_model() return type to include NodeModelResult
  • Fix load() method type annotation in Comparer
  • All 42 mypy source files pass with no issues

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI mentioned this pull request Feb 20, 2026
Copilot AI changed the title [WIP] Address feedback on network support in Japr PR #586 Confirm outdated review comment on _parse_network_input is no longer applicable Feb 20, 2026
Copilot AI requested a review from jpalm3r February 20, 2026 08:26
@jpalm3r
Copy link
Contributor

jpalm3r commented Feb 20, 2026

@copilot run mypy and solve the errors

Co-authored-by: jpalm3r <28826351+jpalm3r@users.noreply.github.com>
Copy link
Author

Copilot AI commented Feb 20, 2026

@copilot run mypy and solve the errors

Fixed in commit 5550ee8. Resolved all 19 mypy errors:

  • NodeObservation.node return type changed to Optional[int]
  • Added None guard in NodeModelResult.node before calling .item()
  • Removed SpatialField inheritance from NetworkModelResult (its extract() signature is incompatible with the Protocol)
  • Fixed matching.py with proper cast() calls and explicit raw_mod_data type annotation
  • Removed NetworkModelResult from raw_mod_data type union in Comparer (after extraction it becomes NodeModelResult, never stored as NetworkModelResult)
  • Fixed _to_model() return type and load() type annotation

mypy src/modelskill/ now reports: Success: no issues found in 42 source files

@jpalm3r
Copy link
Contributor

jpalm3r commented Feb 20, 2026

Closed since it is obsolete. The issues here were solved in #586

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants