Skip to content

Commit

Permalink
Remove typeshed stub for EnumMeta.__call__
Browse files Browse the repository at this point in the history
Reviewed By: pradeep90

Differential Revision: D35751401

fbshipit-source-id: 795aa2e08e905cf825fc72c0f4439db6aa5ce5f5
  • Loading branch information
grievejia authored and facebook-github-bot committed Apr 19, 2022
1 parent 44265cb commit 9059b1b
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions scripts/typeshed-patches/stdlib/enum.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
--- typeshed-master/stdlib/enum.pyi 2022-04-08 18:56:10.000000000 -0700
+++ enum.pyi 2022-04-19 10:19:53.360440629 -0700
@@ -95,35 +95,6 @@
def __members__(self: type[_EnumMemberT]) -> types.MappingProxyType[str, _EnumMemberT]: ...
def __len__(self) -> int: ...
def __bool__(self) -> Literal[True]: ...
- # Simple value lookup
- @overload # type: ignore[override]
- def __call__(cls: type[_EnumMemberT], value: Any, names: None = ...) -> _EnumMemberT: ...
- # Functional Enum API
- if sys.version_info >= (3, 11):
- @overload
- def __call__(
- cls,
- value: str,
- names: _EnumNames,
- *,
- module: str | None = ...,
- qualname: str | None = ...,
- type: type | None = ...,
- start: int = ...,
- boundary: FlagBoundary | None = ...,
- ) -> type[Enum]: ...
- else:
- @overload
- def __call__(
- cls,
- value: str,
- names: _EnumNames,
- *,
- module: str | None = ...,
- qualname: str | None = ...,
- type: type | None = ...,
- start: int = ...,
- ) -> type[Enum]: ...
_member_names_: list[str] # undocumented
_member_map_: dict[str, Enum] # undocumented
_value2member_map_: dict[Any, Enum] # undocumented
Binary file modified stubs/typeshed/typeshed.zip
Binary file not shown.

0 comments on commit 9059b1b

Please sign in to comment.