Skip to content

@overload functions in NUKE_POST_INJECT are missing a function body#10

Open
pushkarev-alexandr wants to merge 1 commit into
sisoe24:mainfrom
pushkarev-alexandr:fix/nuke-post-inject-overload-body
Open

@overload functions in NUKE_POST_INJECT are missing a function body#10
pushkarev-alexandr wants to merge 1 commit into
sisoe24:mainfrom
pushkarev-alexandr:fix/nuke-post-inject-overload-body

Conversation

@pushkarev-alexandr

Copy link
Copy Markdown

Summary

Fixes #9

NUKE_POST_INJECT injects @overload decorated function signatures into the generated nuke/__init__.py, but the strings were missing a function body (...), causing an IndentationError when importing the stubs outside of Nuke's interpreter.

Changes

Added \n ... to each injected function string in NUKE_POST_INJECT:

# Before
'@overload\ndef execute(...) -> None:'

# After
'@overload\ndef execute(...) -> None:\n    ...'

Test plan

  • Run nukestubsgen() inside Nuke
  • Run import nuke from the stubs/ directory in a regular Python interpreter — no IndentationError

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.

@overload functions injected via NUKE_POST_INJECT are missing a function body, causing IndentationError

1 participant