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

Modified the way before/teardown functions #32

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Saunakghosh10
Copy link

Here are the changes made to the code:

Added type hints to function parameters and return types.
Fixed the before_func and teardown_func functions to be asynchronous.
Modified the way before/teardown functions are registered with Quart application to ensure they are inserted at the beginning of the list.

@danielknell
Copy link
Member

it is already inserting them at the start of the list, insert(0, ...) should place the new item at the start of the list.

do you have a minimal example showing this not to be the case?

"""
Request :class:`~injector.Scope`.
"""

import typing
Copy link
Member

@danielknell danielknell Jul 16, 2023

Choose a reason for hiding this comment

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

Suggested change
import typing
"""
Request :class:`~injector.Scope`.
"""
import typing

why remove the comment and spacing? this will upset the linters.

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.

2 participants