bsfs.query.matcher module#

class bsfs.query.matcher.Filter#

Bases: object

Compare a bsfs.query.ast.filter` query’s structure to a reference ast.

The reference ast may include Rest, Partial, or Any to account for irrelevant or unknown ast pieces.

This is only a structural comparison, not a semantic one. For example, the two following queries are semantically identical, but structurally different, and would therefore not match:

>>> ast.filter.OneOf(ast.filter.Predicate(ns.bse.name))
>>> ast.filter.Predicate(ns.bse.name)