diff --git a/stubs/jsonschema/jsonschema/protocols.pyi b/stubs/jsonschema/jsonschema/protocols.pyi index 451e4ec67..16610ac2e 100644 --- a/stubs/jsonschema/jsonschema/protocols.pyi +++ b/stubs/jsonschema/jsonschema/protocols.pyi @@ -19,4 +19,4 @@ class Validator(Protocol): def is_valid(self, instance: dict[Any, Any]) -> bool: ... def iter_errors(self, instance: dict[Any, Any]) -> Iterator[ValidationError]: ... def validate(self, instance: dict[Any, Any]) -> None: ... - def evolve(self, **kwargs) -> "Validator": ... + def evolve(self, **kwargs) -> Validator: ... diff --git a/stubs/pysftp/pysftp/__init__.pyi b/stubs/pysftp/pysftp/__init__.pyi index 514900a13..25adb3f2c 100644 --- a/stubs/pysftp/pysftp/__init__.pyi +++ b/stubs/pysftp/pysftp/__init__.pyi @@ -1,3 +1,4 @@ +from _typeshed import Self from stat import S_IMODE as S_IMODE from types import TracebackType from typing import IO, Any, Callable, ContextManager, Sequence, Text, Union @@ -120,7 +121,7 @@ class Connection: @property def remote_server_key(self) -> paramiko.PKey: ... def __del__(self) -> None: ... - def __enter__(self) -> "Connection": ... + def __enter__(self: Self) -> Self: ... def __exit__( self, etype: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None ) -> None: ...