Skip to content

Fix types for sessions #1173

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

Merged
merged 4 commits into from
Nov 3, 2022
Merged

Conversation

ljodal
Copy link
Contributor

@ljodal ljodal commented Sep 29, 2022

The session key can be None, which type stubs no longer allow after #1129, and the session_dict can be dict[str, Any]

@sobolevn sobolevn requested a review from adamchainz September 29, 2022 20:36
@ljodal ljodal force-pushed the fix/session-key-type branch from 50d2627 to c8c6f05 Compare September 30, 2022 21:10
@ljodal ljodal changed the title Fix types for session key Fix types for sessions Sep 30, 2022
@ljodal
Copy link
Contributor Author

ljodal commented Sep 30, 2022

I found some problems with session_dict as well in BaseSession, so I fixed those as well

@ljodal ljodal mentioned this pull request Nov 3, 2022
Copy link
Contributor

@adamchainz adamchainz left a comment

Choose a reason for hiding this comment

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

LGTM!

@adamchainz adamchainz force-pushed the fix/session-key-type branch from c8c6f05 to ded4e33 Compare November 3, 2022 11:02
Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

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

@sobolevn
Copy link
Member

sobolevn commented Nov 3, 2022

I think I can enable pre-commit.ci to fix this automatically 🤔

@adamchainz adamchainz merged commit a82c83f into typeddjango:master Nov 3, 2022
@adamchainz
Copy link
Contributor

Yes pre-commit.ci ftw!

@adamchainz
Copy link
Contributor

I guess my local pre-commit didn't get applied because this was a rebase commit, and git doesn't fire hooks during rebase 😢

@ljodal ljodal deleted the fix/session-key-type branch November 3, 2022 17:57
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.

3 participants