Cleanup: get_running() methods return query#3018
Conversation
|
Build succeeded. ✔️ pre-commit SUCCESS in 1m 45s |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request is a nice cleanup that refactors the get_running() methods in the database models. By changing them to return model instances directly instead of single-element tuples, the code is now more consistent with other model methods and easier to use, as it removes the need for tuple unpacking in the calling code. The changes are applied consistently across all affected models, helper functions, and tests. This is a good improvement to the codebase, and I have no further comments.
There was a problem hiding this comment.
Code Review
This pull request is a nice cleanup that makes the get_running() methods in the models consistent with the rest of the codebase by returning model instances directly instead of tuples. This simplifies the calling code by removing the need for tuple unpacking. The changes are well-executed across all affected files, including models, helpers, and tests. I've found one minor issue with a docstring that I've commented on. Otherwise, great work!
Makes *.get_running() methods consistent with other model methods that already return a query. Returns model instances directly instead of single-element tuples, removing awkward (obj,) unpacking in all callers. Resolves: packit#3004 Signed-off-by: Marek Blaha <mblaha@redhat.com>
e7027ac to
943620f
Compare
|
Build succeeded. ✔️ pre-commit SUCCESS in 2m 02s |
Makes *.get_running() methods consistent with other model methods that
already return a query. Returns model instances directly instead of
single-element tuples, removing awkward (obj,) unpacking in
all callers.
Resolves: #3004