Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@fzumstein
Copy link
Member

No description provided.

@fzumstein fzumstein added this to the 0.33.17 milestone Oct 13, 2025
@fzumstein fzumstein requested a review from Copilot October 13, 2025 08:36
Copy link

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 PR introduces decorator alias functionality to xlwings, allowing developers to use @script as an alternative to @sub and @func as a shorthand for @xw.func. The changes aim to provide more intuitive decorator names and reduce import verbosity.

  • Added script as an alias for the sub decorator
  • Introduced direct import of func from xlwings on Windows platforms
  • Updated quickstart template to use the shorter @func syntax instead of @xw.func

Reviewed Changes

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

File Description
xlwings/init.py Adds script alias for xlsub decorator and creates script = sub assignment
xlwings/cli.py Updates quickstart template to import func directly and use @func instead of @xw.func

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

return inner
else:
return inner(f)

Copy link

Copilot AI Oct 13, 2025

Choose a reason for hiding this comment

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

[nitpick] The alias assignment script = sub creates a duplicate reference. Consider documenting this alias relationship or using a more explicit aliasing pattern to clarify the intent for future maintainers.

Suggested change
# Alias 'script' to 'sub' for API consistency and to support both naming conventions.

Copilot uses AI. Check for mistakes.
@fzumstein fzumstein merged commit 02d1577 into main Oct 13, 2025
10 checks passed
@fzumstein fzumstein deleted the script-decorator-alias branch October 13, 2025 08:37
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.

2 participants