refactor: Abstract general behaviour from TopPypiReference#299
Merged
Conversation
27ff588 to
b2ce530
Compare
Collaborator
|
/lgtm review |
scastlara
approved these changes
Sep 2, 2025
Collaborator
|
/lgtm review |
Contributor
There was a problem hiding this comment.
🦉 lgtm Review
Score: Needs Work 🔧
🔍 Summary
This PR is a good step towards abstracting the logic for different package sources. The new structure with AbstractPackageReference and a concrete TopPyPiReference is well-designed.
However, there are a couple of critical correctness issues in the implementation of AbstractPackageReference that will cause runtime errors:
- The class is not correctly defined as an Abstract Base Class (it's missing inheritance from
ABC). - The
_parsemethod is not marked as abstract and is defined as a static method, leading to an incorrect implementation that will break theget_packageslogic.
I have also pointed out a couple of minor typos in the new docstrings.
After addressing these points, the PR should be in great shape.
More information
- Id:
dacae0e23b184a37bee76c4dc53ebfab - Model:
gemini-2.5-pro - Created at:
2025-09-03T08:46:54.583419+00:00
Usage summary
- Request count:
2 - Request tokens:
28,495 - Response tokens:
17,762 - Total tokens:
46,257
See the 📚 lgtm-ai repository for more information about lgtm.
ac3a8dc to
7b91a6d
Compare
7b91a6d to
af5f65f
Compare
scastlara
approved these changes
Sep 3, 2025
af5f65f to
c053634
Compare
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.
This is the first step towards #96
In this PR we abstract all the general logic that will be shared across sources.