-
-
Notifications
You must be signed in to change notification settings - Fork 326
Open
Description
Visual Studio Code used to have no issues with the following code:
SOME_SETTING = env("SOME_SETTING", default="fallback")
But in recent versions (1.93.1, for example), "fallback"
is underlined in red. Hovering over it shows this:
Argument of type "Literal['fallback']" cannot be assigned to parameter "default" of type "NoValue" in function "__call__"
"Literal['fallback']" is not assignable to "NoValue" Pylance(reportArgumentType)
Similarly, Visual Studio Code used to have no issues with the following code:
DATABASES = {
"default": env.db("DATABASE_URL_default", default="sqlite:///db.sqlite3"),
}
But in recent versions, "sqlite:///db.sqlite3"
is underlined in red. Hovering over it shows this:
Argument of type "Literal['sqlite:///db.sqlite3']" cannot be assigned to parameter "default" of type "NoValue" in function "db_url"
"Literal['sqlite:///db.sqlite3']" is not assignable to "NoValue" Pylance(reportArgumentType)
I don't know if the issue is with django-environ or Pylance or Pyright.
nikitagrygoriev, xander-ab, MadhavVij, lucaspar, stemcc and 6 more
Metadata
Metadata
Assignees
Labels
No labels