fix: correct FRLM flow coverage annotation#525
Conversation
There was a problem hiding this comment.
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 fromNonetodict[str, float]. - Add a test assertion verifying
get_flow_coverage()returns adict.
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 Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #525 +/- ##
=====================================
Coverage 76.9% 76.9%
=====================================
Files 29 29
Lines 3700 3700
=====================================
Hits 2846 2846
Misses 854 854
🚀 New features to boost your workflow:
|
|
@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. |
|
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. |
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.