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

Incorrect type hinting for settings.SERVERS #648

Open
WoosterInitiative opened this issue Aug 6, 2024 · 1 comment
Open

Incorrect type hinting for settings.SERVERS #648

WoosterInitiative opened this issue Aug 6, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@WoosterInitiative
Copy link

Bug report

What's wrong

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.

How is that should be

SPECTACULAR_SETTINGS["SERVERS"] = [{'url': 'https://example.com/v1', 'description': 'Text'}, ...]

That is example from the docs.

System information

  • OS:
  • python version: 3.12.4
  • django version: 4.2.15
  • mypy version: 1.7.1
  • django-stubs version: 5.0.4
@WoosterInitiative WoosterInitiative added the bug Something isn't working label Aug 6, 2024
@sobolevn
Copy link
Member

sobolevn commented Aug 6, 2024

PR is welcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants