def test_category_nomatch(self, category): sub = _substitution_with_span(0, 2, category=category) self.assertEqual( list( substitution.suppress_exclude_bytes([sub], {'foo.bar': [(0, 2)]})), [sub])
def find_iter_parsed( self, parsed: _matcher.PythonParsedFile ) -> Iterable[substitution.Substitution]: return substitution.suppress_exclude_bytes( self.searcher.find_iter_parsed(parsed), _pragma_excluded_ranges(parsed), )
def test_intersect(self, start, end): sub = _substitution_with_span(start, end) self.assertEqual( list(substitution.suppress_exclude_bytes([sub], {None: [(1, 6)]})), [])