-
-
Notifications
You must be signed in to change notification settings - Fork 0
🏷️ types: move to ty #24
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ | |
| import argparse | ||
| import ast | ||
| from collections.abc import Callable | ||
| from typing import Any | ||
|
|
||
| from expr_simplifier import __version__ | ||
| from expr_simplifier.transforms import apply_constant_folding, apply_cse, apply_logical_simplification | ||
|
|
@@ -24,7 +25,7 @@ def create_pass_parser( | |
| name: str, | ||
| passes: list[Pass], | ||
| description: str, | ||
| subparser: argparse._SubParsersAction[argparse.ArgumentParser], # pyright: ignore [reportPrivateUsage] | ||
| subparser: Any, | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @copilot 这个不能用某种方式保持类型吗?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 已改成保留类型信息的写法了,见 39da1f6。现在这里用一个只约束 |
||
| ) -> None: | ||
| parser = subparser.add_parser(name, help=description) | ||
| parser.add_argument("input", help="The expression to simplify") | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.vscode/settings.jsonstill containspython.analysis.*settings (inlay hints), which are provided by Pylance. Since this change replaces the Pylance recommendation withastral-sh.ty, contributors may lose those editor features unless they manually install Pylance. Consider recommending bothms-python.vscode-pylanceandastral-sh.ty, or remove the remainingpython.analysis.*settings if the project is intentionally moving away from Pylance.