Skip to content

Code quality: update Ruff Rules (Bandit, S)#377

Merged
figueroa1395 merged 15 commits intoPowerGridModel:mainfrom
furqan463:update_ruff
Mar 2, 2026
Merged

Code quality: update Ruff Rules (Bandit, S)#377
figueroa1395 merged 15 commits intoPowerGridModel:mainfrom
furqan463:update_ruff

Conversation

@furqan463
Copy link
Contributor

Relates issue: #352

Adds ruff lint rules Bandit "S".

Signed-off-by: furqan463 <ahmadfurqanc@gmail.com>
Signed-off-by: furqan463 <ahmadfurqanc@gmail.com>
Signed-off-by: furqan463 <ahmadfurqanc@gmail.com>
@furqan463
Copy link
Contributor Author

After replacing assert with if raise in src, test coverage has declined.

Signed-off-by: furqan463 <ahmadfurqanc@gmail.com>
@mgovers mgovers changed the title Update Ruff Rules (Bandit, S) Code quality: update Ruff Rules (Bandit, S) Feb 26, 2026
Signed-off-by: furqan463 <ahmadfurqanc@gmail.com>
@furqan463
Copy link
Contributor Author

@mgovers a number of TODOs are present in pandapower_converter regarding creating unit tests, although unit tests are already created for these methods. Should these TODOs be removed?

Signed-off-by: furqan463 <ahmadfurqanc@gmail.com>
Signed-off-by: furqan463 <ahmadfurqanc@gmail.com>
Signed-off-by: furqan463 <ahmadfurqanc@gmail.com>
Signed-off-by: furqan463 <ahmadfurqanc@gmail.com>
@furqan463 furqan463 requested a review from mgovers February 26, 2026 15:55
@mgovers mgovers added the improvement Existing functionality, but better, faster, stronger label Mar 2, 2026
mgovers
mgovers previously approved these changes Mar 2, 2026
mgovers
mgovers previously approved these changes Mar 2, 2026
Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
Copy link
Member

@mgovers mgovers left a comment

Choose a reason for hiding this comment

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

apologies for the merge mess i caused. there was a merge conflict in the uv.lock and i messed up during the manual merge. i've force-pushed to undo the bugged change and now it's in a good state again.

@figueroa1395 and/or @nitbharambe can one of you do a final review? I don't want to sign off cause i did some changes myself as well.

Copy link
Member

@figueroa1395 figueroa1395 left a comment

Choose a reason for hiding this comment

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

Hello @furqan463, I gave an additional review as requested by @mgovers. Most comments are either very minor or questions from my side. This should be easy to resolve and be good to go soon.

Thanks again for the contribution!

@figueroa1395
Copy link
Member

@mgovers a number of TODOs are present in pandapower_converter regarding creating unit tests, although unit tests are already created for these methods. Should these TODOs be removed?

@furqan463 I just noticed we never replied to this message. I see indeed some (if not all) the unit tests comments no longer apply. Can you also remove the ones that have already been added?

Signed-off-by: furqan463 <ahmadfurqanc@gmail.com>
Signed-off-by: furqan463 <ahmadfurqanc@gmail.com>
Signed-off-by: furqan463 <ahmadfurqanc@gmail.com>
@furqan463 furqan463 requested a review from figueroa1395 March 2, 2026 10:12
@figueroa1395 figueroa1395 added this pull request to the merge queue Mar 2, 2026
Merged via the queue into PowerGridModel:main with commit 608e961 Mar 2, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Existing functionality, but better, faster, stronger

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants