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

Fixed mixins.startup.serve UnboundLocalError. #2992

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pygeek
Copy link

@pygeek pygeek commented Jul 31, 2024

Fixes #2985

the finally block in mixins.serve references a variable that is only defined in the try block. This results in a UnboundLocalError within the finally block.

@pygeek pygeek requested a review from a team as a code owner July 31, 2024 01:48
@pygeek pygeek force-pushed the fix-startup-serve branch 2 times, most recently from 7f02bc3 to fe55023 Compare July 31, 2024 01:50
@pygeek pygeek changed the title Fix startup serve reference error. gh-2985: Fix startup serve reference error. Jul 31, 2024
@pygeek pygeek changed the title gh-2985: Fix startup serve reference error. #2985: Fix startup serve reference error. Jul 31, 2024
@pygeek pygeek changed the title #2985: Fix startup serve reference error. Fixed startup serve reference error. Jul 31, 2024
@pygeek
Copy link
Author

pygeek commented Jul 31, 2024

There do not seem to be existing tests that specifically test the functionality of mixins.startup.serve, nor the startup module overall.

@pygeek pygeek force-pushed the fix-startup-serve branch from fe55023 to aad408a Compare July 31, 2024 02:02
@pygeek pygeek changed the title Fixed startup serve reference error. gh-2985: Fixed startup serve UnboundLocalError. Jul 31, 2024
@pygeek pygeek changed the title gh-2985: Fixed startup serve UnboundLocalError. Fixed mixins.startup.serve UnboundLocalError. Jul 31, 2024
@pygeek pygeek force-pushed the fix-startup-serve branch 2 times, most recently from 9ddf8bd to 6d80c7e Compare July 31, 2024 03:14
@pygeek pygeek force-pushed the fix-startup-serve branch from 6d80c7e to 0d7b2ae Compare July 31, 2024 05:17
@pygeek pygeek requested a review from a team as a code owner July 31, 2024 05:17
@pygeek
Copy link
Author

pygeek commented Jul 31, 2024

Type error being raised by CI by line 724 of mixins.startup existed prior to my changes. https://github.com/sanic-org/sanic/actions/runs/10174510874/job/28140377393?pr=2992#step:2:566

Same for the 8 other mypy type-check errors.

Copy link

codecov bot commented Jul 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.451%. Comparing base (fcbd747) to head (0d7b2ae).
Report is 32 commits behind head on main.

Additional details and impacted files
@@              Coverage Diff              @@
##              main     #2992       +/-   ##
=============================================
- Coverage   87.617%   87.451%   -0.167%     
=============================================
  Files          101       101               
  Lines         7575      7666       +91     
  Branches      1329      1350       +21     
=============================================
+ Hits          6637      6704       +67     
- Misses         641       661       +20     
- Partials       297       301        +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

启动报错
1 participant