Skip to content
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

Add more known types for better generation with pybind11 #18269

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion mypy/stubgenc.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,18 @@ def __init__(
"List",
"Literal",
"NamedTuple",
"Never",
"NoReturn",
"Set",
"Optional",
"Tuple",
"Type",
"TypeIs",
"TypeGuard",
Comment on lines +263 to +264
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are TypeIs, TypeGuard, Never and NoReturn common in c extensions? If they are not commonly used I think it is better to leave them out.

"Union",
]
],
"os": ["PathLike"],
"pathlib": ["Path"],
Comment on lines +267 to +268
Copy link
Collaborator

@hamdanal hamdanal Dec 21, 2024

Choose a reason for hiding this comment

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

If it is easy enough please add a test for things imported from modules other than typing.

}
)

Expand Down
Loading