Merged
Conversation
- Replace unsafe eval() with ast.literal_eval() in question.py - Add safe_literal_eval() function with fallback for edge cases - Improve exception handling with specific exception types - Add comprehensive type annotations to submission.py functions - Implement exponential backoff retry strategy for submissions - Extract CLI module with i18n, input utils, and cookie management Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Refactor leetcode.py to use new CLI modules - Remove inline I18N dictionary (use cli.i18n module) - Remove inline helper functions (use cli.input_utils module) - Remove inline cookie functions (use cli.browser_cookie module) - Add section comments for better code organization - Extract helper functions for category and contest handling - Fix import path in tools.py (daily_auto import) The refactored leetcode.py is ~40% smaller while maintaining all original functionality. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove unsafe eval() fallback in safe_literal_eval to prevent code injection - Use contextvars for i18n language state to fix race condition in concurrent environments - Replace broad Exception catches with specific exception types in browser_cookie.py Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.