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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve core.files.storages types for Django 4.2 #1488

Merged
merged 4 commits into from May 26, 2023

Conversation

Alexerson
Copy link
Contributor

Hello 馃憢 ,

this PR鈥痠s adding types for the new storages concepts added in 4.2:
https://docs.djangoproject.com/en/4.2/ref/files/storage/#django.core.files.storage.storages
&
https://docs.djangoproject.com/en/4.2/ref/files/storage/#the-inmemorystorage-class

I didn鈥檛 find any tests for the existing storages concepts so didn鈥檛 add any. Let me know if you鈥檇 like for me to add some.

Copy link
Collaborator

@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! A few more tweaks :)

django-stubs/core/files/storage.pyi Outdated Show resolved Hide resolved
django-stubs/core/files/storage.pyi Outdated Show resolved Hide resolved
django-stubs/core/files/storage.pyi Outdated Show resolved Hide resolved
@intgr intgr self-assigned this May 15, 2023
@intgr intgr changed the title Add types for the new storages in 4.2 Improve core.files.storages types for Django 4.2 May 16, 2023
Copy link
Collaborator

@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.

Let's merge this and fix the remaining things in a follow-up pull request.

@Alexerson
Copy link
Contributor Author

Ok, so it wasn鈥檛 actually so difficult to do that properly, and as this PR鈥痠s not merged yet, I鈥痶hink we should do it properly right away.

The only part I鈥痺asn鈥檛 sure about was the typing of mixins.StorageSettingsMixin鈥檚 methods.

@intgr
Copy link
Collaborator

intgr commented May 26, 2023

this PR鈥痠s not merged yet

Oops, sorry, I was waiting for CI and forgot to merge afterwards.

@Alexerson
Copy link
Contributor Author

No worries. The CI鈥痵eems to be green again after your commit, thanks.

@intgr intgr merged commit 9183969 into typeddjango:master May 26, 2023
14 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.

None yet

2 participants