Conversation
Summary of ChangesHello @max-wittig, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly refactors the project's development environment by adopting Highlights
Changelog
Ignored Files
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request migrates the project from using black, isort, and flake8 to ruff for code formatting and linting. The configuration changes and dependency updates are appropriate for this switch. Most of the code changes are stylistic improvements applied by ruff. However, I've identified a critical logical bug in the retry mechanism in oidc/provider.py that was present before but is highlighted by the code reformatting. Please see the specific comment for details.
| retry_codes = [429, 500, 502, 503, 504] | ||
| for retry in range(10): | ||
| if 10 < retry: | ||
| if retry > 10: |
There was a problem hiding this comment.
This condition retry > 10 will never be true within a for retry in range(10) loop, as retry will only take values from 0 to 9. This makes the check and the return {} statement on the next line unreachable (dead code).
If all 10 retries fail, the loop completes and the function implicitly returns None. This will cause an AttributeError in build_identity when it attempts to call .get() on the None return value.
To fix this, you should remove this if block and instead return {} after the loop to handle the case where all retries are exhausted.
There was a problem hiding this comment.
As I didn't change the meaning of this code here, let's not modify it.
1bb8dfc to
48678ea
Compare
No description provided.