Skip to content

Commit 8a1e8ed

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 85d3012 commit 8a1e8ed

File tree

8 files changed

+21
-40
lines changed

8 files changed

+21
-40
lines changed

src/hamcrest/core/assert_that.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,11 @@
1616

1717

1818
@overload
19-
def assert_that(actual_or_assertion: T, matcher: Matcher[T], reason: str = "") -> None:
20-
...
19+
def assert_that(actual_or_assertion: T, matcher: Matcher[T], reason: str = "") -> None: ...
2120

2221

2322
@overload
24-
def assert_that(actual_or_assertion: bool, reason: str = "") -> None:
25-
...
23+
def assert_that(actual_or_assertion: bool, reason: str = "") -> None: ...
2624

2725

2826
def assert_that(actual_or_assertion, matcher=None, reason=""):

src/hamcrest/core/core/is_.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,11 @@ def describe_to(self, description: Description):
2929

3030

3131
@overload
32-
def _wrap_value_or_type(x: Type) -> Matcher[object]:
33-
...
32+
def _wrap_value_or_type(x: Type) -> Matcher[object]: ...
3433

3534

3635
@overload
37-
def _wrap_value_or_type(x: T) -> Matcher[T]:
38-
...
36+
def _wrap_value_or_type(x: T) -> Matcher[T]: ...
3937

4038

4139
def _wrap_value_or_type(x):
@@ -46,18 +44,15 @@ def _wrap_value_or_type(x):
4644

4745

4846
@overload
49-
def is_(x: Type) -> Matcher[Any]:
50-
...
47+
def is_(x: Type) -> Matcher[Any]: ...
5148

5249

5350
@overload
54-
def is_(x: Matcher[T]) -> Matcher[T]:
55-
...
51+
def is_(x: Matcher[T]) -> Matcher[T]: ...
5652

5753

5854
@overload
59-
def is_(x: T) -> Matcher[T]:
60-
...
55+
def is_(x: T) -> Matcher[T]: ...
6156

6257

6358
def is_(x):

src/hamcrest/core/core/isnot.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,11 @@ def describe_mismatch(self, item: T, mismatch_description: Description) -> None:
3030

3131

3232
@overload
33-
def _wrap_value_or_type(x: Type) -> Matcher[object]:
34-
...
33+
def _wrap_value_or_type(x: Type) -> Matcher[object]: ...
3534

3635

3736
@overload
38-
def _wrap_value_or_type(x: T) -> Matcher[T]:
39-
...
37+
def _wrap_value_or_type(x: T) -> Matcher[T]: ...
4038

4139

4240
def _wrap_value_or_type(x):
@@ -47,13 +45,11 @@ def _wrap_value_or_type(x):
4745

4846

4947
@overload
50-
def is_not(match: Type) -> Matcher[object]:
51-
...
48+
def is_not(match: Type) -> Matcher[object]: ...
5249

5350

5451
@overload
55-
def is_not(match: Union[Matcher[T], T]) -> Matcher[T]:
56-
...
52+
def is_not(match: Union[Matcher[T], T]) -> Matcher[T]: ...
5753

5854

5955
def is_not(match):

src/hamcrest/library/collection/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Matchers of collections."""
2+
23
from .is_empty import empty
34
from .isdict_containing import has_entry
45
from .isdict_containingentries import has_entries

src/hamcrest/library/collection/isdict_containingentries.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,20 +73,17 @@ def describe_to(self, description: Description) -> None:
7373

7474
# Keyword argument form
7575
@overload
76-
def has_entries(**keys_valuematchers: Union[Matcher[V], V]) -> Matcher[Mapping[str, V]]:
77-
...
76+
def has_entries(**keys_valuematchers: Union[Matcher[V], V]) -> Matcher[Mapping[str, V]]: ...
7877

7978

8079
# Key to matcher dict form
8180
@overload
82-
def has_entries(keys_valuematchers: Mapping[K, Union[Matcher[V], V]]) -> Matcher[Mapping[K, V]]:
83-
...
81+
def has_entries(keys_valuematchers: Mapping[K, Union[Matcher[V], V]]) -> Matcher[Mapping[K, V]]: ...
8482

8583

8684
# Alternating key/matcher form
8785
@overload
88-
def has_entries(*keys_valuematchers: Any) -> Matcher[Mapping[Any, Any]]:
89-
...
86+
def has_entries(*keys_valuematchers: Any) -> Matcher[Mapping[Any, Any]]: ...
9087

9188

9289
def has_entries(*keys_valuematchers, **kv_args):

src/hamcrest/library/number/iscloseto.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,11 @@ def describe_to(self, description: Description) -> None:
6262

6363

6464
@overload
65-
def close_to(value: float, delta: float) -> Matcher[float]:
66-
...
65+
def close_to(value: float, delta: float) -> Matcher[float]: ...
6766

6867

6968
@overload
70-
def close_to(value: Decimal, delta: Decimal) -> Matcher[Decimal]:
71-
...
69+
def close_to(value: Decimal, delta: Decimal) -> Matcher[Decimal]: ...
7270

7371

7472
def close_to(value, delta):

src/hamcrest/library/object/hasproperty.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,20 +94,17 @@ def has_property(name: str, match: Union[None, Matcher[V], V] = None) -> Matcher
9494

9595
# Keyword argument form
9696
@overload
97-
def has_properties(**keys_valuematchers: Union[Matcher[V], V]) -> Matcher[Any]:
98-
...
97+
def has_properties(**keys_valuematchers: Union[Matcher[V], V]) -> Matcher[Any]: ...
9998

10099

101100
# Name to matcher dict form
102101
@overload
103-
def has_properties(keys_valuematchers: Mapping[str, Union[Matcher[V], V]]) -> Matcher[Any]:
104-
...
102+
def has_properties(keys_valuematchers: Mapping[str, Union[Matcher[V], V]]) -> Matcher[Any]: ...
105103

106104

107105
# Alternating name/matcher form
108106
@overload
109-
def has_properties(*keys_valuematchers: Any) -> Matcher[Any]:
110-
...
107+
def has_properties(*keys_valuematchers: Any) -> Matcher[Any]: ...
111108

112109

113110
def has_properties(*keys_valuematchers, **kv_args):

src/hamcrest/library/text/substringmatcher.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,4 @@ def describe_to(self, description: Description) -> None:
2020
).append_description_of(self.substring)
2121

2222
@abstractmethod
23-
def relationship(self):
24-
...
23+
def relationship(self): ...

0 commit comments

Comments
 (0)