Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Lupa stubs:#14359

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
jmarianer wants to merge4 commits intopython:main
base:main
Choose a base branch
Loading
fromjmarianer:main
Open

Lupa stubs:#14359

jmarianer wants to merge4 commits intopython:mainfromjmarianer:main

Conversation

jmarianer
Copy link

@jmarianerjmarianer commentedJul 1, 2025
edited
Loading

Support get/set/del from Lua tables.
Lua table values are all Any because we can't typecheck across language boundaries.
Support unpack_returned_tuples in the LuaRuntime constructor.

Support get/set/del from Lua tables.Lua table values are all Any because we can't typecheck across language boundaries.Support unpack_returned_tuples in the LuaRuntime constructor.# Please enter the commit message for your changes. Lines starting# with '#' will be ignored, and an empty message aborts the commit.## Date:      Tue Jul 1 16:43:21 2025 -0700## On branch main# Your branch is ahead of 'origin/main' by 1 commit.#   (use "git push" to publish your local commits)## Changes to be committed:#modified:   lua51.pyi#modified:   lua52.pyi#modified:   lua53.pyi#modified:   lua54.pyi#
@jmarianer
Copy link
Author

The failing check is easy enough to fix, but I found a possible way to get around the Any and I need to test it, so I'll be a while.

@github-actionsGitHub Actions

This comment has been minimized.

@github-actionsGitHub Actions

This comment has been minimized.

@github-actionsGitHub Actions
Copy link
Contributor

According tomypy_primer, this change has no effect on the checked open source code. 🤖🎉

Copy link
Collaborator

@srittausrittau left a comment

Choose a reason for hiding this comment

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

Thanks, remarks below. Please note that I only left remarks on the first file, but they apply to all files.

@@ -70,8 +73,7 @@ class LuaRuntime:
lua_implementation: Final[str]
lua_version: Final[tuple[int, int]]

# @classmethod
# def __cinit__(cls, unpack_return_tuples: bool) -> None: ...
def __init__(self, /, unpack_returned_tuples: bool, *args: Any) -> None: ...
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please note that we need a comment for eachAny, explaining which types are allowed and/or how it's used.

Comment on lines +47 to +48
LuaKey: TypeAlias = str | int
LuaObject: TypeAlias = _LuaTable | int | str | float | bool | None
Copy link
Collaborator

Choose a reason for hiding this comment

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

As far as I understand, these are not available at runtime, so we need to preface them with an underscore.

You could also consider adding alupa._types modules where you define these type-check only items and just import them, but that's just an option.

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

@srittausrittausrittau requested changes

Requested changes must be addressed to merge this pull request.

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@jmarianer@srittau

[8]ページ先頭

©2009-2025 Movatter.jp