Closed agateau-gg closed 5 months ago
Attention: 32 lines
in your changes are missing coverage. Please review.
Comparison is base (
278fdcc
) 91.90% compared to head (16324d7
) 91.89%.
Files | Patch % | Lines |
---|---|---|
ggshield/verticals/auth/oauth.py | 25.58% | 32 Missing :warning: |
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This PR simplifies OAuthClient code.
RequestHandler is no longer an inner class. This was required for it to get access to the RequestHandlerWrapper instance creating it, but this made the code hard to read.
This commit changes this by:
Removing RequestHandlerWrapper: its
complete
anderror_message
attributes have been moved to OAuthClient as_request_finished
and_request_error_message
.Making
RequestHandler.__init__()
take an OAuthClient instance in addition to the arguments it already accepts.Making RequestHandler update the new OAuthClient attributes added in 1)
Passing to HTTPServer a partial of RequestHandler class, initialized with the OAuthClient instance.