Skip to content

Conversation

@eduardoChaucaGallegos
Copy link

@eduardoChaucaGallegos eduardoChaucaGallegos commented Dec 16, 2025

Description

This pull request makes minor improvements to the loader_action_manager.py file, focusing on code clarity and maintainability. The most notable change is the use of functools.partial to simplify the signal handler connection for action triggers.

Code quality and maintainability:

  • Replaced the lambda function with functools.partial when connecting the triggered signal to _execute_hook, making the code more readable and less error-prone.
  • Moved the import sgtk statement to follow standard import order and added the import for functools.partial.

This is a replica from shotgunsoftware/tk-multi-loader2#131

… avoid late-binding closure issues. Also reorganize imports to follow PEP 8 conventions.
@eduardoChaucaGallegos eduardoChaucaGallegos requested review from a team and staceyoue December 16, 2025 18:25
@eduardoChaucaGallegos eduardoChaucaGallegos changed the title SG-41524 Replace lambda with functools.partial in get_actions_for_publishes.py SG-41525 Replace lambda with functools.partial in get_actions_for_publishes.py Dec 16, 2025
Copy link
Member

@julien-lang julien-lang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member

@julien-lang julien-lang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! One minor suggestion but not mandatory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants