Blob Blame History Raw
diff -up twisted-twisted-22.10.0/src/twisted/trial/_dist/test/matchers.py.orig twisted-twisted-22.10.0/src/twisted/trial/_dist/test/matchers.py
--- twisted-twisted-22.10.0/src/twisted/trial/_dist/test/matchers.py.orig	2023-09-02 21:07:36.218128220 -0600
+++ twisted-twisted-22.10.0/src/twisted/trial/_dist/test/matchers.py	2023-09-02 22:07:06.570113409 -0600
@@ -14,7 +14,7 @@ __all__ = [
 from typing import List, Sequence, Tuple, TypeVar
 
 from hamcrest import (
-    contains_exactly,
+    contains,
     contains_string,
     equal_to,
     has_length,
@@ -72,7 +72,7 @@ def matches_result(
     )
 
 
-class HasSum(BaseMatcher[Sequence[S]]):
+class HasSum(BaseMatcher):
     """
     Match a sequence the elements of which sum to a value matched by
     another matcher.
@@ -81,7 +81,7 @@ class HasSum(BaseMatcher[Sequence[S]]):
     :ivar zero: The zero value for the matched type.
     """
 
-    def __init__(self, sumMatcher: Matcher[S], zero: S) -> None:
+    def __init__(self, sumMatcher: Matcher, zero: S) -> None:
         self.sumMatcher = sumMatcher
         self.zero = zero
 
@@ -118,7 +118,7 @@ class HasSum(BaseMatcher[Sequence[S]]):
         description.append_text(", ")
 
 
-class IsSequenceOf(BaseMatcher[Sequence[T]]):
+class IsSequenceOf(BaseMatcher):
     """
     Match a sequence where every element is matched by another matcher.
 
@@ -126,7 +126,7 @@ class IsSequenceOf(BaseMatcher[Sequence[
         sequence.
     """
 
-    def __init__(self, elementMatcher: Matcher[T]) -> None:
+    def __init__(self, elementMatcher: Matcher) -> None:
         self.elementMatcher = elementMatcher
 
     def _matches(self, item: Sequence[T]) -> bool:
@@ -156,7 +156,7 @@ class IsSequenceOf(BaseMatcher[Sequence[
         description.append_text(", ")
 
 
-def isFailure(**properties: Matcher[object]) -> Matcher[object]:
+def isFailure(**properties: Matcher) -> Matcher:
     """
     Match an instance of L{Failure} with matching attributes.
     """
@@ -168,7 +168,7 @@ def isFailure(**properties: Matcher[obje
 
 def similarFrame(
     functionName: str, fileName: str
-) -> Matcher[Sequence[Tuple[str, str, int, List[object], List[object]]]]:
+) -> Matcher:
     """
     Match a tuple representation of a frame like those used by
     L{twisted.python.failure.Failure}.
@@ -181,7 +181,7 @@ def similarFrame(
     # In particular, the last frame should be a tuple like
     #
     # (functionName, fileName, someint, [], [])
-    return contains_exactly(
+    return contains(
         equal_to(functionName),
         contains_string(fileName),  # type: ignore[arg-type]
         instance_of(int),  # type: ignore[arg-type]
diff -up twisted-twisted-22.10.0/src/twisted/trial/test/matchers.py.orig twisted-twisted-22.10.0/src/twisted/trial/test/matchers.py
--- twisted-twisted-22.10.0/src/twisted/trial/test/matchers.py.orig	2023-09-02 21:49:26.261975182 -0600
+++ twisted-twisted-22.10.0/src/twisted/trial/test/matchers.py	2023-09-02 22:15:06.726327660 -0600
@@ -18,7 +18,7 @@ _A = TypeVar("_A")
 _B = TypeVar("_B")
 
 
-class _MatchAfter(BaseMatcher[_A]):
+class _MatchAfter(BaseMatcher):
     """
     The implementation of L{after}.
 
@@ -30,7 +30,7 @@ class _MatchAfter(BaseMatcher[_A]):
         L{describe_mismatch}.
     """
 
-    def __init__(self, f: Callable[[_A], _B], m: Matcher[_B]):
+    def __init__(self, f: Callable[[_A], _B], m: Matcher):
         self.f = f
         self.m = m
         self._e: Optional[Exception] = None
@@ -74,14 +74,14 @@ class _MatchAfter(BaseMatcher[_A]):
         self.m.describe_to(description)
 
 
-def after(f: Callable[[_A], _B], m: Matcher[_B]) -> Matcher[_A]:
+def after(f: Callable[[_A], _B], m: Matcher) -> Matcher:
     """
     Create a matcher which calls C{f} and uses C{m} to match the result.
     """
     return _MatchAfter(f, m)
 
 
-def fileContents(m: Matcher[str], encoding: str = "utf-8") -> Matcher[IFilePath]:
+def fileContents(m: Matcher, encoding: str = "utf-8") -> Matcher:
     """
     Create a matcher which matches a L{FilePath} the contents of which are
     matched by L{m}.
diff -up twisted-twisted-22.10.0/src/twisted/trial/test/test_loader.py.orig twisted-twisted-22.10.0/src/twisted/trial/test/test_loader.py
--- twisted-twisted-22.10.0/src/twisted/trial/test/test_loader.py.orig	2023-09-02 22:22:36.932653323 -0600
+++ twisted-twisted-22.10.0/src/twisted/trial/test/test_loader.py	2023-09-02 22:22:51.731598282 -0600
@@ -72,7 +72,7 @@ class FinderPy3Tests(packages.SysPathMan
         )
 
 
-def looselyResembles(module: ModuleType) -> Matcher[ModuleType]:
+def looselyResembles(module: ModuleType) -> Matcher:
     """
     Match a module with a L{ModuleSpec} like that of the given module.