Skip to content

feat: favorite #154

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
Jun 8, 2025
Merged

feat: favorite #154

merged 4 commits into from
Jun 8, 2025

Conversation

QuBenhao
Copy link
Owner

@QuBenhao QuBenhao commented Jun 8, 2025

This PR adds a favorite management feature to the LeetCode scripts, expanding the user interface to include options for listing and batch-adding favorite problems.

Added new functions in python/scripts/leetcode.py to handle favorite listing and question selection.
Introduced a helper function in python/scripts/get_problem.py to retrieve question slugs based on IDs.
Created new API helper functions and GraphQL queries in python/lc_libs/favorite.py and python/constants/favorite_query.py, and updated their imports in python/constants/init.py.

@QuBenhao QuBenhao requested a review from Copilot June 8, 2025 12:53
@QuBenhao QuBenhao self-assigned this Jun 8, 2025
@QuBenhao QuBenhao linked an issue Jun 8, 2025 that may be closed by this pull request
Copilot

This comment was marked as outdated.

@QuBenhao QuBenhao requested a review from Copilot June 8, 2025 13:09
@QuBenhao QuBenhao changed the title 153 favorite feat: favorite Jun 8, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a favorite management feature to the LeetCode scripts, expanding the user interface to include options for listing and batch-adding favorite problems.

  • Added new functions in python/scripts/leetcode.py to handle favorite listing and question selection.
  • Introduced a helper function in python/scripts/get_problem.py to retrieve question slugs based on IDs.
  • Created new API helper functions and GraphQL queries in python/lc_libs/favorite.py and python/constants/favorite_query.py, and updated their imports in python/constants/init.py.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
python/scripts/leetcode.py Adds favorite management functions and integrates them into the main menu.
python/scripts/get_problem.py Refactors question slug retrieval by introducing get_question_slug_by_id.
python/lc_libs/favorite.py Implements API calls for handling favorites through batch addition and query functions.
python/constants/favorite_query.py Provides new GraphQL queries for favorite-related operations.
python/constants/init.py Updates constants to include favorite query definitions.
Comments suppressed due to low confidence (1)

python/scripts/leetcode.py:11

  • The math module is used for performing pagination calculations but is not imported. Add 'import math' at the top of the file to prevent runtime errors.
from concurrent.futures import ThreadPoolExecutor

Update python/scripts/leetcode.py

Co-authored-by: Copilot <[email protected]>
@QuBenhao QuBenhao merged commit a8de745 into master Jun 8, 2025
@QuBenhao QuBenhao deleted the 153-favorite branch June 8, 2025 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

favorite
1 participant