Skip to content

Conversation

@fabiencastan
Copy link
Member

This pull request updates several places in the codebase to use the more general callable() function instead of checking specifically for types.FunctionType. This change improves compatibility and flexibility when determining if an object can be called like a function.

@fabiencastan fabiencastan added this to the Meshroom 2026.1.0 milestone Sep 21, 2025
@codecov
Copy link

codecov bot commented Sep 21, 2025

Codecov Report

❌ Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 79.55%. Comparing base (0438f49) to head (1bd0f3d).
⚠️ Report is 3 commits behind head on develop.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
meshroom/core/attribute.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2900      +/-   ##
===========================================
- Coverage    79.56%   79.55%   -0.01%     
===========================================
  Files           51       51              
  Lines         6977     6974       -3     
===========================================
- Hits          5551     5548       -3     
  Misses        1426     1426              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request replaces direct types.FunctionType instance checks with the more general callable() function across the Meshroom codebase. This change improves type checking flexibility by accommodating any callable object, not just function types.

  • Replaces isinstance(obj, types.FunctionType) with callable(obj) in multiple locations
  • Improves compatibility with callable objects like lambdas, methods, and classes with __call__
  • Maintains the same logical behavior while being more inclusive of callable types

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
meshroom/core/node.py Updates attribute group callable check in command variable building
meshroom/core/desc/attribute.py Updates expression detection logic to use callable()
meshroom/core/attribute.py Updates multiple callable checks for value setting, default values, validation, and enabled state

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@cbentejac cbentejac merged commit b21ca05 into develop Sep 22, 2025
4 of 5 checks passed
@cbentejac cbentejac deleted the dev/callable branch September 22, 2025 07:31
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.

3 participants