SG-41525 Replace lambda with functools.partial in get_actions_for_publishes.py #5
Merged
eduardoChaucaGallegos merged 4 commits intomainfrom Jan 8, 2026
Conversation
… avoid late-binding closure issues. Also reorganize imports to follow PEP 8 conventions.
julien-lang
reviewed
Dec 16, 2025
Member
julien-lang
left a comment
There was a problem hiding this comment.
I prefer having a module name when calling a method or object. So we know it's coming from a different file.
It's a personal preference but I think it makes things easier to read.
… into ticket/SG-41524-lambda-closure-bug-in-loader_action_manager
staceyoue
approved these changes
Dec 17, 2025
julien-lang
approved these changes
Dec 17, 2025
Member
julien-lang
left a comment
There was a problem hiding this comment.
LGTM! One minor suggestion but not mandatory.
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.
Description
This pull request makes minor improvements to the
loader_action_manager.pyfile, focusing on code clarity and maintainability. The most notable change is the use offunctools.partialto simplify the signal handler connection for action triggers.Code quality and maintainability:
functools.partialwhen connecting thetriggeredsignal to_execute_hook, making the code more readable and less error-prone.import sgtkstatement to follow standard import order and added the import forfunctools.partial.This is a replica from shotgunsoftware/tk-multi-loader2#131