10000 Fix flake8 errors on updated jsonschema stubs · python/typeshed@9a3a65f · GitHub
[go: up one dir, main page]

Skip to content

Commit 9a3a65f

Browse files
committed
Fix flake8 errors on updated jsonschema stubs
1 parent a966aee commit 9a3a65f

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

stubs/jsonschema/jsonschema/_format.pyi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
from collections.abc import Iterable
22
from typing import Any, Callable, TypeVar
33

4-
F = TypeVar("F", bound=Callable[..., Any])
4+
_F = TypeVar("_F", bound=Callable[..., Any])
55

66
class FormatChecker:
7-
checkers: dict[str, tuple[Callable[[Any], bool], Exception | tuple[Exception, ...],],]
7+
checkers: dict[str, tuple[Callable[[Any], bool], Exception | tuple[Exception, ...]]]
88

99
def __init__(self, formats: Iterable[str] | None = ...) -> None: ...
10-
def checks(self, format: str, raises: Exception | tuple[Exception, ...] = ...) -> Callable[[F], F]: ...
10+
def checks(self, format: str, raises: Exception | tuple[Exception, ...] = ...) -> Callable[[_F], _F]: ...
1111
@classmethod
12-
def cls_checks(cls, format: str, raises: Exception | tuple[Exception, ...] = ...) -> Callable[[F], F]: ...
12+
def cls_checks(cls, format: str, raises: Exception | tuple[Exception, ...] = ...) -> Callable[[_F], _F]: ...
1313
def check(self, instance: Any, format: str) -> None: ...
1414
def conforms(self, instance: Any, format: str) -> bool: ...
1515

stubs/jsonschema/jsonschema/exceptions.pyi

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
from _typeshed import Self
22
from collections import deque
3-
from collections.abc import Container
4-
from typing import Any, Callable, Iterable, Sequence
3+
from collections.abc import Callable, Container, Iterable, Sequence
4+
from typing import Any
55

66
from jsonschema import _utils, protocols
77

8-
RelevanceFuncType = Callable[[ValidationError], Any]
8+
_RelevanceFuncType = Callable[[ValidationError], Any]
99

1010
WEAK_MATCHES: frozenset[str]
1111
STRONG_MATCHES: frozenset[str]
@@ -78,8 +78,8 @@ class ErrorTree:
7878
@property
7979
def total_errors(self): ...
8080

81-
def by_relevance(weak: Container[str] = ..., strong: Container[str] = ...) -> RelevanceFuncType: ...
81+
def by_relevance(weak: Container[str] = ..., strong: Container[str] = ...) -> _RelevanceFuncType: ...
8282

83-
relevance: RelevanceFuncType
83+
relevance: _RelevanceFuncType
8484

85-
def best_match(errors: Iterable[ValidationError], key: RelevanceFuncType = ...): ...
85+
def best_match(errors: Iterable[ValidationError], key: _RelevanceFuncType = ...): ...

0 commit comments

Comments
 (0)
0