@@ -216,35 +216,35 @@ def contains(
216216 )
217217
218218 @staticmethod
219- def matches (pattern : str ) -> "Matcher[str]" :
219+ def matches (match : str ) -> "Matcher[str]" :
220220 """Match a string by a pattern.
221221
222222 Arguments:
223- pattern : Regular expression pattern.
223+ match : Regular expression pattern.
224224 """
225- pattern_re = re .compile (pattern )
225+ match_re = re .compile (match )
226226
227227 return Matcher (
228- match = functools .partial (matches , pattern_re ),
229- description = repr (pattern ),
228+ match = functools .partial (matches , match_re ),
229+ description = repr (match ),
230230 )
231231
232232 @staticmethod
233- def error (type : type [ErrorT ], message : str | None = None ) -> "Matcher[ErrorT]" :
233+ def error (type : type [ErrorT ], match : str | None = None ) -> "Matcher[ErrorT]" :
234234 """Match an exception object.
235235
236236 Arguments:
237237 type: The type of exception to match.
238- message : An optional regular expression pattern to match.
238+ match : An optional regular expression pattern to match.
239239 """
240- message_re = re .compile (message or "" )
240+ match_re = re .compile (match or "" )
241241 description = type .__name__
242242
243- if message :
244- description = f"{ description } message= { message !r} "
243+ if match :
244+ description = f"{ description } match= { match !r} "
245245
246246 return Matcher (
247- match = functools .partial (error , type , message_re ),
247+ match = functools .partial (error , type , match_re ),
248248 name = "error" ,
249249 description = description ,
250250 )
0 commit comments