Typed task model#1226
Draft
Lotram wants to merge 4 commits into
Draft
Conversation
Lotram
marked this pull request as draft
July 22, 2026 13:01
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 PR is a suggestion of data models refactoring.
Why ?
Issue(and child classes) becomes less useful, it does not hold any specific logic, I suggest an implementation where it's merged into Service.Service, record) and data inserted in taskwarriorWhat's inside this PR
TaskandUdasmodelsService/Issue, so we use that instead of plain dicts (indb.py,collect.pyetc)IssueinsideService, as there is no clear difference between the twoselfis only used to access the config) out ofServiceCommits 3 and 4 are optional, I think they're improvements, but not necessary.
I only modified Linear to demonstrate this.
The idea is not to review it in details for now, there are probably some bugs, but to discuss the overall shape of the changes.
What's next ?
If we proceed with this changes, I would then use Task even more in
db.py, and try avoid using dicts.We could also replace calls to
taskw.task.FIELDSby our ownTaskobject