Open WoosterInitiative opened 1 month ago
When trying to specify SPECTACULAR_SETTINGS["SERVERS"] per Settings mypy complains Error: List item 0 has incompatible type "dict[str, Any]"; expected "str" [list-item]. Per the docs this setting should be a list of dicts.
SPECTACULAR_SETTINGS["SERVERS"]
Error: List item 0 has incompatible type "dict[str, Any]"; expected "str" [list-item]
SPECTACULAR_SETTINGS["SERVERS"] = [{'url': 'https://example.com/v1', 'description': 'Text'}, ...]
That is example from the docs.
python
django
mypy
django-stubs
PR is welcome
Bug report
What's wrong
When trying to specify
SPECTACULAR_SETTINGS["SERVERS"]
per Settings mypy complainsError: List item 0 has incompatible type "dict[str, Any]"; expected "str" [list-item]
. Per the docs this setting should be a list of dicts.How is that should be
That is example from the docs.
System information
python
version: 3.12.4django
version: 4.2.15mypy
version: 1.7.1django-stubs
version: 5.0.4