Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tidy-First] Refactor safe run hooks #10944

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

QMalcolm
Copy link
Contributor

Resolves #10938

Problem

safe_run_hooks was a bit hard to read. This tidies it up a bit without making any logical changes

Solution

Tidy it without making any logical changes

Checklist

  • I have read the contributing guide and understand what's expected of me.
  • I have run this code in development, and it appears to resolve the stated issue.
  • This PR includes tests, or tests are not required or relevant for this PR.
  • This PR has no interface changes (e.g., macros, CLI, logs, JSON artifacts, config files, adapter interface, etc.) or this PR has already received feedback and approval from Product or DX.
  • This PR includes type annotations for new and modified functions.

If it isn't apparent, I'm trying to reduce the need for tracking variables
to make it easier extract the execution code to a separate private function
to make it easier to see what is happening.
@QMalcolm QMalcolm added the Skip Changelog Skips GHA to check for changelog file label Oct 30, 2024
@QMalcolm QMalcolm requested a review from a team as a code owner October 30, 2024 16:10
@cla-bot cla-bot bot added the cla:yes label Oct 30, 2024
Copy link

codecov bot commented Oct 30, 2024

Codecov Report

Attention: Patch coverage is 51.42857% with 17 lines in your changes missing coverage. Please review.

Project coverage is 78.05%. Comparing base (dd77210) to head (9731eaa).

❗ There is a different number of reports uploaded between BASE (dd77210) and HEAD (9731eaa). Click for more details.

HEAD has 16 uploads less than BASE
Flag BASE (dd77210) HEAD (9731eaa)
unit 3 1
integration 15 1
Additional details and impacted files
@@             Coverage Diff             @@
##             main   #10944       +/-   ##
===========================================
- Coverage   89.19%   78.05%   -11.14%     
===========================================
  Files         183      183               
  Lines       23496    23494        -2     
===========================================
- Hits        20958    18339     -2619     
- Misses       2538     5155     +2617     
Flag Coverage Δ
integration 71.91% <51.42%> (-14.68%) ⬇️
unit 62.09% <2.85%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Unit Tests 62.09% <2.85%> (+<0.01%) ⬆️
Integration Tests 71.91% <51.42%> (-14.68%) ⬇️

@QMalcolm QMalcolm added the tidy_first "Tidy First" incremental cleanup changes label Oct 30, 2024
In 9731eaa when splitting out the hook execution logic I screwed up
the indentation of most of the logic 🙈 This fixes that
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla:yes Skip Changelog Skips GHA to check for changelog file tidy_first "Tidy First" incremental cleanup changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Tidy First] Refactor safe_run_hooks
1 participant