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

V2 of asyncjsonwrap #373

Merged
merged 12 commits into from Jun 29, 2021
Merged

V2 of asyncjsonwrap #373

merged 12 commits into from Jun 29, 2021

Conversation

H-Shay
Copy link
Contributor

@H-Shay H-Shay commented Jun 25, 2021

Here is the second version of asyncjsonwrap, based on the code skeleton you gave me. I did not add a changelog to this one because I figured only one of these PRs would be merged, so I'd add the proper changelog file to whichever version is the final one. The jury is out on which version is more readable/cleaner...

@clokep
Copy link
Contributor

clokep commented Jun 25, 2021

@H-Shay Looks like this has some conflicts due to merging the other branch!

@clokep clokep self-requested a review June 25, 2021 16:19
Copy link
Contributor

@clokep clokep left a comment

Choose a reason for hiding this comment

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

Looks great overall, since we're not using callbacks anymore we can clean the code up a bit!

changelog.d/372.misc Outdated Show resolved Hide resolved
changelog.d/373.misc Outdated Show resolved Hide resolved
sydent/http/servlets/__init__.py Outdated Show resolved Hide resolved
sydent/http/servlets/__init__.py Outdated Show resolved Hide resolved
Signed-off-by: H.Shay <shaysquared@gmail.com>
@H-Shay H-Shay requested a review from clokep June 25, 2021 18:31
sydent/http/servlets/__init__.py Outdated Show resolved Hide resolved
sydent/http/servlets/__init__.py Outdated Show resolved Hide resolved
sydent/http/servlets/__init__.py Outdated Show resolved Hide resolved
sydent/http/servlets/__init__.py Outdated Show resolved Hide resolved
@clokep clokep self-requested a review June 28, 2021 17:22
Copy link
Contributor

@clokep clokep left a comment

Choose a reason for hiding this comment

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

Looks good with the minor change!


:param f: The original function passed to the asyncjsonwrap decorator
Copy link
Contributor

Choose a reason for hiding this comment

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

f isn't a parameter to inner, so I think we should leave it out from here!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right it's a param to render. I wasn't paying attention there!

@clokep clokep merged commit b3b3a27 into matrix-org:main Jun 29, 2021
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