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

Conditionally inject CLI arguments into factory #2402

Merged
merged 5 commits into from Mar 23, 2022
Merged

Conditionally inject CLI arguments into factory #2402

merged 5 commits into from Mar 23, 2022

Conversation

ahopkins
Copy link
Member

@ahopkins ahopkins commented Feb 23, 2022

When starting with --factory, the CLI will attempt to inject the CLI arguments Namespace into the factory (if possible).

Additional benefit is that we will allow arbitrary arguments in the CLI in factory mode.

@ahopkins ahopkins requested a review from a team as a code owner February 23, 2022 07:33
@codecov
Copy link

codecov bot commented Feb 23, 2022

Codecov Report

Merging #2402 (5726732) into main (c9dbc8e) will decrease coverage by 0.059%.
The diff coverage is n/a.

@@              Coverage Diff              @@
##              main     #2402       +/-   ##
=============================================
- Coverage   87.243%   87.183%   -0.060%     
=============================================
  Files           60        60               
  Lines         5017      5017               
  Branches       904       904               
=============================================
- Hits          4377      4374        -3     
- Misses         468       470        +2     
- Partials       172       173        +1     
Impacted Files Coverage Δ
sanic/server/protocols/http_protocol.py 84.523% <0.000%> (-3.572%) ⬇️

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 c9dbc8e...5726732. Read the comment docs.

prryplatypus
prryplatypus previously approved these changes Feb 23, 2022
Copy link
Member

@prryplatypus prryplatypus left a comment

Choose a reason for hiding this comment

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

LGTM. Wanna add a test?

@ahopkins
Copy link
Member Author

LGTM. Wanna add a test?

I was waiting until #2401 is merged so that the tests could reuse the same fake factory module.

@ahopkins ahopkins merged commit 0030425 into main Mar 23, 2022
@ahopkins ahopkins deleted the factory-args branch March 23, 2022 10:00
ChihweiLHBird pushed a commit to ChihweiLHBird/sanic that referenced this pull request Jun 1, 2022
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.

None yet

2 participants