-
mypy errors out with the following message
|
Beta Was this translation helpful? Give feedback.
Answered by
uriyyo
Nov 19, 2024
Replies: 3 comments 1 reply
-
Hi @glung, I tried to reproduce this issue using latest mypy version Here is code that I used: from starlette.applications import Starlette
from starlette.middleware.cors import CORSMiddleware
app = Starlette()
origins = [
"http://localhost",
"http://localhost:8080",
]
allow_origin_regex = r"https://.*\.example\.org"
app.add_middleware(
CORSMiddleware,
allow_origins=origins,
allow_origin_regex=allow_origin_regex,
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
) $ mypy foo.py --strict
Success: no issues found in 1 source file Could you please provide more context? |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Kludex
-
I can confirm that it works with mypy 1.13.0. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @glung,
I tried to reproduce this issue using latest mypy version
1.13.0
and starlette0.41.3
and can't reproduce this issue.Here is code that I used:
Could you please provide more context?