Skip to content

Remove Redundant Overload#1439

Merged
mgovers merged 2 commits into
PowerGridModel:mainfrom
furqan463:remove_overload
Jun 17, 2026
Merged

Remove Redundant Overload#1439
mgovers merged 2 commits into
PowerGridModel:mainfrom
furqan463:remove_overload

Conversation

@furqan463

@furqan463 furqan463 commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

The calculate_power_flow() overloads at line 473 and 487 both are similar except that the second one has argument update_data: None = ...,, while the first one omits it. However, the update_data: None = ..., covers the case of not passing the update_data at all.

Reference to the comment #1178 (comment)

  • IDE Autocomplete working
  • mypy run passed

Signed-off-by: Engr. Ahmad Furqan <ahmadfurqanc@gmail.com>
@figueroa1395 figueroa1395 added the improvement Improvement on internal implementation label Jun 16, 2026

@figueroa1395 figueroa1395 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I see that there are test cases in place that already cover this. If CI doesn't complain, this is good to go then. I'll approve once the checks are green.

Comment thread src/power_grid_model/_core/power_grid_model.py
@mgovers

mgovers commented Jun 17, 2026

Copy link
Copy Markdown
Member

I see that there are test cases in place that already cover this. If CI doesn't complain, this is good to go then. I'll approve once the checks are green.

@overload is semantics only. we do not have tests that check for the existence of overloads explicitly. The code runs through the implementation only. Only mypy may catch missing implementations if and when hit.

@mgovers mgovers enabled auto-merge June 17, 2026 06:26
@mgovers mgovers added this pull request to the merge queue Jun 17, 2026
Merged via the queue into PowerGridModel:main with commit 9955852 Jun 17, 2026
32 checks passed
@furqan463 furqan463 deleted the remove_overload branch June 17, 2026 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improvement on internal implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants