File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -183,7 +183,7 @@ def __copy__(self: RegexPatternSelf) -> RegexPatternSelf:
183183 other .pattern = self .pattern
184184 return other
185185
186- def __eq__ (self , other : RegexPattern ) -> bool :
186+ def __eq__ (self , other : object ) -> bool :
187187 """
188188 Tests the equality of this regex pattern with *other* (:class:`RegexPattern`)
189189 by comparing their :attr:`~Pattern.include` and :attr:`~RegexPattern.regex`
Original file line number Diff line number Diff line change @@ -146,10 +146,11 @@ def detailed_match_files(
146146 # Add files and record pattern.
147147 for result_file in result_files :
148148 if result_file in return_files :
149+ # We know here that .patterns is a list, becasue we made it here
149150 if all_matches :
150- return_files [result_file ].patterns .append (pattern )
151+ return_files [result_file ].patterns .append (pattern ) # type: ignore[attr-defined]
151152 else :
152- return_files [result_file ].patterns [0 ] = pattern
153+ return_files [result_file ].patterns [0 ] = pattern # type: ignore[index]
153154 else :
154155 return_files [result_file ] = MatchDetail ([pattern ])
155156
You can’t perform that action at this time.
0 commit comments