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

Wrong inheritance from responses #147

Closed
migduroli opened this issue Oct 10, 2024 · 0 comments · Fixed by #148
Closed

Wrong inheritance from responses #147

migduroli opened this issue Oct 10, 2024 · 0 comments · Fixed by #148
Assignees
Labels
bug Something isn't working

Comments

@migduroli
Copy link
Member

Summary

Response classes wrongly override the call method

Reproduce steps

from flama.http import FileResponse

class PDFTemplateResponse(FileResponse):
    async def __call__(self, scope: types.Scope, receive: types.Receive, send: types.Send) -> None: 
         await super().__call__(scope, receive, send) 

This code should be calling the method __call__ of the class FileResponse as it should, but to the __call__ method of the class flama.http.Response. This eventually lead to undesired behaviours.

Schema library

None

Models library

None

Error logs

No response

@migduroli migduroli added the bug Something isn't working label Oct 10, 2024
@migduroli migduroli self-assigned this Oct 10, 2024
@migduroli migduroli linked a pull request Oct 10, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant