[python-pytrakt] Refactor: Add IdsMixin to replace extract_ids() utility method#186
Draft
glensc wants to merge 12 commits intomoogar0880:masterfrom
Draft
[python-pytrakt] Refactor: Add IdsMixin to replace extract_ids() utility method#186glensc wants to merge 12 commits intomoogar0880:masterfrom
glensc wants to merge 12 commits intomoogar0880:masterfrom
Conversation
46db657 to
9a199c6
Compare
Contributor
Author
|
Also, the existing extraction is inconsistent. not applied for TVShow and Movie in this example:
|
2643789 to
2157af6
Compare
Contributor
Author
|
Can't finish UserList as it uses namedtuple: |
Contributor
Author
|
A change is needed to namedtuple definitions (UserList):
since namedtuple doesn't allow optional values, this would be a breaking change, meaning this needs to land in 4.x |
1cbaa2d to
1a5a46b
Compare
d565a62 to
008c34c
Compare
Contributor
Author
|
This is ready now, but not sure if this breakage is big enough that this needs to go to 4.x? if you're not creating |
008c34c to
f8f7a2e
Compare
Contributor
Author
|
External projects calling |
glensc
added a commit
to glensc/python-pytrakt
that referenced
this pull request
Dec 11, 2022
9 tasks
Contributor
Author
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.
Extracting the "ids" on each response is tedious, and such duplication results users being confused:
Also, the existing extraction is inconsistent (Not applied for TVShow and Movie in this example):
PyTrakt/trakt/sync.py
Lines 331 to 342 in 8a6d4f1
This will make the ids extraction automatic, and prevent updating the attributes directly.
Additionally it came out that properties like
tmdb_id,imdb_id,trakt_idare unused. they are initialized asNonein the constructor but never any other value. these are commented with@deprecatedand are to be removed in 4.x.TODO: