Skip to content

Add type hints.#608

Closed
timothyliu3d wants to merge 2 commits intomgear-dev:masterfrom
timothyliu3d:dev/5.1.2/fix-type-hints
Closed

Add type hints.#608
timothyliu3d wants to merge 2 commits intomgear-dev:masterfrom
timothyliu3d:dev/5.1.2/fix-type-hints

Conversation

@timothyliu3d
Copy link
Copy Markdown
Contributor

Description of Changes

Some type hint updates during custom component work.
I am assuming Python 2 is still supported, so I'm limiting these to docstrings/comments and not using type annotations.

Testing Done

Maya 2026
Able to build/rebuild EPIC Mannequin template in 5.1.2 and 5.2.1.

Related Issue(s)

N/A

…e-hints

# Conflicts:
#	release/scripts/mgear/core/attribute.py
#	release/scripts/mgear/shifter/__init__.py
#	release/scripts/mgear/shifter/component/__init__.py
@timothyliu3d timothyliu3d changed the title Dev/5.1.2/fix type hints Add type hints. Jan 24, 2026
@miquelcampos
Copy link
Copy Markdown
Member

Thanks for this PR

@miquelcampos miquelcampos self-assigned this Mar 12, 2026
@miquelcampos miquelcampos moved this to WIP in mGear DEV Mar 12, 2026
@miquelcampos miquelcampos moved this from WIP to To Do in mGear DEV Mar 13, 2026
@miquelcampos
Copy link
Copy Markdown
Member

decided not to use type hints for consistency

@github-project-automation github-project-automation bot moved this from To Do to 5.3.x in mGear DEV Mar 25, 2026
@timothyliu3d
Copy link
Copy Markdown
Contributor Author

@miquelcampos in case this is a misunderstanding, I feel I should clarify that these changes are all limited within the docstrings, and are not the inline type annotations.

The goal is to provide real data types for auto-complete or agents.
E.g. current use of "pyNode" (or "dagNode") is generally understood, but "pm.node._Node" refers to a real class that IDEs can recognize to help with the authoring process.

🟢 What this is trying to do:

def func(param1):
    """Description

    Arguments:
        param1 (str): description.

    Returns:
        pm.node._Node: Still within the docstring, but using the actual class instead of "pyNode" or "dagNode".
    """
    pass

❌ What this is NOT:

def func(param1: str) -> bool:
    """Description"""
    pass

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

Labels

None yet

Projects

Status: 5.3.x

Development

Successfully merging this pull request may close these issues.

2 participants