mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-20 00:28:28 +08:00
Improve __enter__ & constructor methods (#7114)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from _typeshed import SupportsRead, SupportsWrite
|
||||
from _typeshed import Self, SupportsRead, SupportsWrite
|
||||
from collections.abc import Iterable, Iterator, MutableMapping
|
||||
from pathlib import Path
|
||||
from typing import Any, Callable, ClassVar, Protocol, Sequence, SupportsBytes, Union
|
||||
@@ -118,7 +118,7 @@ class Image:
|
||||
def height(self) -> int: ...
|
||||
@property
|
||||
def size(self) -> tuple[int, int]: ...
|
||||
def __enter__(self) -> Image: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(self, *args: Any) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
|
||||
Reference in New Issue
Block a user