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

Importing from DRF in settings.py raises errors #536

Open
johanvergeer opened this issue Feb 1, 2024 · 0 comments
Open

Importing from DRF in settings.py raises errors #536

johanvergeer opened this issue Feb 1, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@johanvergeer
Copy link

Bug report

What's wrong

I am configuring mypy for our project and now I run into some issues with DRF. I attemted to follow #371 and #255 but they keep giving issues at runtime. The issue is not that we get a TypeError: type 'ModelViewSet' is not subscriptable, but all sorts of errors that look like they have to do with importing in settings.py.

The issues I'm facing

How is that should be

I should be able to import DRF classes in settings.py and add them to the django_stubs_ext.monkeypatch extras parameter

System information

  • OS: Windows
  • python version: 3.11
  • django version: 4.2.7
  • mypy version: 1.6.1
  • django-stubs version: 4.2.6
  • djangorestframework version: 3.14.0
  • djangorestframework-stubs version: 3.14.4
@johanvergeer johanvergeer added the bug Something isn't working label Feb 1, 2024
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

1 participant