From 85318d1b215a32825fd4ecb7fa6466fe75f7c428 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sun, 16 Jan 2022 10:18:17 -0800 Subject: [PATCH] Cleanup: do not quote types unnecessarily (#6931) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- stubs/jsonschema/jsonschema/protocols.pyi | 2 +- stubs/pysftp/pysftp/__init__.pyi | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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: ...