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
fix: auth schemes #1226
base: master
Are you sure you want to change the base?
fix: auth schemes #1226
Changes from all commits
7b1061b
277eae9
8524a9e
ec3e8a4
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.
Missing
None
check forauth_mode
before accessinglower()
could causeAttributeError
. Should checkauth_mode
is notNone
before callinglower()
.📝 Committable Code Suggestion
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.
Missing
None
check forauth_mode
before accessinglower()
could causeAttributeError
. Should checkauth_mode
is notNone
before callinglower()
.📝 Committable Code Suggestion
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.
There's a typo in the docstring:
authenticatio
should beauthentication
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.
Consider adding a docstring to explain the purpose of the
mode
field and its relationship withauth_mode
. This would help clarify why both fields exist and when each should be used.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.
The
auth_mode
field is made optional but there is no handling for when bothauth_mode
andmode
areNone
, which could cause runtime errors when accessing these fields later.📝 Committable Code Suggestion
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.
The code assumes
auth_scheme.mode
exists before checking it, which could raiseAttributeError
ifauth_scheme
isNone
. Should checkauth_scheme
first.📝 Committable Code Suggestion
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.
The code assumes
auth_scheme.mode
exists before checking it, which could raiseAttributeError
ifauth_scheme
isNone
. Should checkauth_scheme
first.📝 Committable Code Suggestion
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.
The
mode
field is used to setauth_mode
but the originalscheme_name
is not mapped toname
, causing potential data inconsistency when both old and new field names are used.📝 Committable Code Suggestion
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.
The type ignore comment should explain why the method overload is not being referenced and what's the proper way to fix it. This would help future maintainers understand if this is a temporary workaround or a permanent solution.
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.
There's a typo in the comment:
integratuib
should beintegration
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.
Handle the case where no app with
no_auth
set toFalse
is found to avoid potentialUnboundLocalError
.