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

Add missing import on HTTPSRedirectMiddleware docs section #1873

Merged
merged 1 commit into from
Sep 27, 2022

Conversation

TheOnlyWayUp
Copy link
Contributor

The docs for HTTPSRedirectMiddleware (here) reference a Middleware class in the code snippet

from starlette.applications import Starlette
from starlette.middleware.httpsredirect import HTTPSRedirectMiddleware

routes = ...

middleware = [
    Middleware(HTTPSRedirectMiddleware)
]

app = Starlette(routes=routes, middleware=middleware)

Middleware isn't defined in that context, the required code

from starlette.middleware import Middleware

Is present in all other examples, leading me to believe that this wasn't intentional.


This pull request adds an import for a class that's referenced in the code, but not imported.

@Kludex Kludex changed the title Required class not imported Add missing import on HTTPSRedirectMiddleware docs section Sep 27, 2022
@Kludex Kludex merged commit 711d75a into encode:master Sep 27, 2022
@Kludex
Copy link
Sponsor Member

Kludex commented Sep 27, 2022

Thanks @TheOnlyWayUp 🙏

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