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

Specify return type for APIClient.credentials method #469

Merged
merged 2 commits into from
Oct 4, 2023

Conversation

ltakens
Copy link
Contributor

@ltakens ltakens commented Sep 21, 2023

Help type checkers infer the return type of the .credentials method on the APIClient class.

E.g. vscode's Pylance extension seems to report a partially unknown type:

Screenshot 2023-09-21 at 23 41 42

mypy and pyright don't report this error when run from the command line.

Copy link
Contributor

@intgr intgr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

The test failures are unrelated and due to django-stubs changes. I can hopefully fix them tomorrow, and then also merge this PR.

@intgr intgr merged commit b2e3b52 into typeddjango:master Oct 4, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants