Instead of requiring each class inheriting from ResponseHandler to
define its match() method, make the latter non-abstract and default to
returning True for all queries. This will reduce the amount of
boilerplate code in custom servers.
method.
"""
- @abc.abstractmethod
+ # pylint: disable=unused-argument
def match(self, qctx: QueryContext) -> bool:
"""
- Matching logic - query is handled when it returns True.
+ Matching logic - the first handler whose `match()` method returns True
+ is used for handling the query.
+
+ The default for each handler is to handle all queries.
"""
return True