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

refactor(http): use multiple inheritance for http wrappers #124

Merged
merged 35 commits into from
Aug 11, 2022

Conversation

ooliver1
Copy link
Member

This moves all HTTP wrappers to separate files so editors can handle them.

Each wrapper container subclasses BaseHTTPClient so the types of self._request and other attributes are known.
BaseHTTPClient is subclassed last from HTTPClient for a consistent mro order that python likes - overwrites the wrapper containers which are also subclasses.

@ooliver1 ooliver1 added scope/nextcore.http Any changes to the nextcore.http namespace type/refactor Refactor code labels Jul 20, 2022
@ooliver1 ooliver1 requested a review from TAG-Epic July 20, 2022 15:55
Copy link
Member

@TAG-Epic TAG-Epic left a comment

Choose a reason for hiding this comment

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

Note that ive not looked at the wrappers as i assume all of them is copy pasted

nextcore/http/client/__init__.py Show resolved Hide resolved
nextcore/http/client/base_client.py Outdated Show resolved Hide resolved
nextcore/http/client/wrappers/__init__.py Show resolved Hide resolved
@ooliver1 ooliver1 force-pushed the ooliver1/refactor/http-client-multi-inheritance branch from 002c23c to 0c30b2e Compare July 20, 2022 16:50
nextcore/http/client/base_client.py Outdated Show resolved Hide resolved
nextcore/http/client/base_client.py Outdated Show resolved Hide resolved
nextcore/http/client/base_client.py Outdated Show resolved Hide resolved
nextcore/http/client/base_client.py Outdated Show resolved Hide resolved
nextcore/http/client/base_client.py Outdated Show resolved Hide resolved
nextcore/http/client/base_client.py Outdated Show resolved Hide resolved
nextcore/http/client/base_client.py Outdated Show resolved Hide resolved
nextcore/http/client/wrappers/application_commands.py Outdated Show resolved Hide resolved
docs/http.rst Show resolved Hide resolved
nextcore/http/client/wrappers/__init__.py Show resolved Hide resolved
@ooliver1 ooliver1 requested review from TAG-Epic and alentoghostflame and removed request for TAG-Epic and alentoghostflame July 26, 2022 11:45
Copy link
Member

@TAG-Epic TAG-Epic left a comment

Choose a reason for hiding this comment

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

Can ShardManager & Shard be changed to require GatewayHTTPWrappers instead of HTTPClient?

@ooliver1 ooliver1 force-pushed the ooliver1/refactor/http-client-multi-inheritance branch from 54b0f73 to e4900fa Compare August 9, 2022 13:38
@TAG-Epic TAG-Epic merged commit abd3a61 into master Aug 11, 2022
@TAG-Epic TAG-Epic deleted the ooliver1/refactor/http-client-multi-inheritance branch August 11, 2022 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope/nextcore.http Any changes to the nextcore.http namespace type/refactor Refactor code
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants