Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
gh-102721: Improve coverage of _collections_abc._CallableGenericAlias#102722
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -481,15 +481,8 @@ def __getitem__(self, item): | ||
| # rather than the default types.GenericAlias object. Most of the | ||
| # code is copied from typing's _GenericAlias and the builtin | ||
| # types.GenericAlias. | ||
| if not isinstance(item, tuple): | ||
| item = (item,) | ||
| # A special case in PEP 612 where if X = Callable[P, int], | ||
| # then X[int, str] == X[[int, str]]. | ||
| if (len(self.__parameters__) == 1 | ||
| and _is_param_expr(self.__parameters__[0]) | ||
| and item and not _is_param_expr(item[0])): | ||
| item = (item,) | ||
Comment on lines -487 to -492 Member
| ||
| new_args = super().__getitem__(item).__args__ | ||
Uh oh!
There was an error while loading. Please reload this page.