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

Make get_app name optional #2053

Merged
merged 4 commits into from
Mar 11, 2021
Merged

Make get_app name optional #2053

merged 4 commits into from
Mar 11, 2021

Conversation

ahopkins
Copy link
Member

Resolves #2048

When only one Sanic instance has been registered, get_app() should return it even if no name has been passed.

Sanic("app")

app = Sanic.get_app()

@ahopkins ahopkins requested a review from a team as a code owner March 10, 2021 07:52
@codecov
Copy link

codecov bot commented Mar 10, 2021

Codecov Report

Merging #2053 (dce4e85) into master (400f54c) will increase coverage by 0.015%.
The diff coverage is 100.000%.

Impacted file tree graph

@@              Coverage Diff              @@
##            master     #2053       +/-   ##
=============================================
+ Coverage   91.981%   91.995%   +0.015%     
=============================================
  Files           36        36               
  Lines         3292      3298        +6     
  Branches       559       562        +3     
=============================================
+ Hits          3028      3034        +6     
  Misses         179       179               
  Partials        85        85               
Impacted Files Coverage Δ
sanic/app.py 91.489% <100.000%> (+0.110%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 400f54c...dce4e85. Read the comment docs.

@ahopkins ahopkins requested a review from a team March 10, 2021 10:43
@ahopkins ahopkins merged commit d76925c into master Mar 11, 2021
@ahopkins ahopkins deleted the 2048-getapp branch March 11, 2021 14:28
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.

Sanic.get_app with no app name
2 participants