Skip to content

fix: correct FRLM flow coverage annotation#525

Open
samay2504 wants to merge 1 commit into
pysal:mainfrom
samay2504:fix/frlm-flow-coverage-annotation
Open

fix: correct FRLM flow coverage annotation#525
samay2504 wants to merge 1 commit into
pysal:mainfrom
samay2504:fix/frlm-flow-coverage-annotation

Conversation

@samay2504

Copy link
Copy Markdown

This PR fixes issue #524 by updating FRLM.get_flow_coverage() to use a dictionary return annotation that matches its actual return value, and it adds a small test assertion that checks the returned object type, which keeps the public API contract explicit for type checkers and editor tooling without changing runtime behaviour.

Copilot AI review requested due to automatic review settings April 11, 2026 18:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes the public type contract for FRLM.get_flow_coverage() so its return annotation matches the actual runtime return value (a summary dictionary), and it adds a small test assertion to keep that contract explicit.

Changes:

  • Update FRLM.get_flow_coverage() return type annotation from None to dict[str, float].
  • Add a test assertion verifying get_flow_coverage() returns a dict.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
spopt/locate/flow.py Corrects the return type annotation for get_flow_coverage() to reflect its actual dictionary return value.
spopt/tests/test_locate/test_flow.py Adds a lightweight assertion that the get_flow_coverage() result is a dictionary.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov

codecov Bot commented Apr 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.9%. Comparing base (9b36063) to head (7fa0807).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main    #525   +/-   ##
=====================================
  Coverage   76.9%   76.9%           
=====================================
  Files         29      29           
  Lines       3700    3700           
=====================================
  Hits        2846    2846           
  Misses       854     854           
Files with missing lines Coverage Δ
spopt/locate/flow.py 73.2% <100.0%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jGaboardi

jGaboardi commented Apr 11, 2026

Copy link
Copy Markdown
Member

@samay2504 – You have opened more than 5 Issue+PR pairs in a very short period. Please provide a statement on each associated PR as to the degree of LLM usage that was utilized to both create the issue & PR. This statement should be written by you, not CoPilot or any other LLM.

I can't speak for other maintainers, but I am unwilling to review mass-produced PRs generated by LLMs.

If no explanation is provided in a timely manner, we reserved to right to close them.

cc @knaaptime @martinfleis

@samay2504

samay2504 commented Apr 11, 2026

Copy link
Copy Markdown
Author

For transparency, I prepared and validated this change myself; I identified the mismatch between the annotation and runtime return type, made the code and test edits locally, ran the checks, and reviewed the diff before opening the PR. I did use tooling assistance in a limited way for wording and minor drafting support, but the technical diagnosis, implementation decisions, testing, and final commit content were done by me. I understand the concern about high-volume submissions, and I will slow down my pace and include explicit disclosure notes on each related PR going forward.

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.

3 participants