Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[MCC-961880] Add
MAuthASGIMiddleware
#34[MCC-961880] Add
MAuthASGIMiddleware
#34Changes from 34 commits
72ea924
a3cb337
8e19c2f
6cf5ab8
b570bdf
8971405
e7b1c9c
de20288
151fc4a
60db262
de00c7f
ee79eda
0066550
1fa62d0
a3e95dd
15dcdd6
fdaa43a
aeb4ba2
1041277
e41271f
028f38f
d401ba1
5ae7dc6
d7c5801
ad3617e
2c96be3
768904d
905f455
739f897
5501fa4
a630160
61f7889
78ccfe2
6bc5a4c
15f04b7
0e9c0b2
c1f9bc7
f74cce4
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to keep a reference or make a shallow copy of the set? As is, if a set is passed in, changes to that set will (potentially accidentally) change this exemption set in the middleware, which feels like it might be surprising behavior.
(Also not sure what best practices are, but I typically like to set the argument to
None
and set the default here, since setting it in the arg list won't prevent someone from passingNone
in. e.g.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for making a copy, yea good idea. will do.
for
None
as the default.. hmm does that mean we should change the typing notation toUnion[set, None]
?? theoretically the type hints should prevent them from passing a non-set
for that arg. how about a compromise: raiseTypeError
if it's not a set?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually nevermind the compromise, i see the proper way to do type hints when using
None
default is to useOptional
:https://stackoverflow.com/a/49724148