M test/test_util.py +1 -1
@@ 736,7 736,7 @@ def test_search_types():
'by.name': {'query': 'str', 'return': 'query'},
'by.not': {'item': 'query', 'return': 'query'},
'by.or': {'items': 'Packed[query]', 'return': 'query'},
- 'by.source': {'query': 'query', 'return': 'query'},
+ 'by.source': {'source': 'str', 'return': 'query'},
'by.tzaware': {'return': 'query'}
}
M tshistory/search.py +5 -5
@@ 180,18 180,18 @@ class query:
class bysource(query):
- __slots__ = ('query',)
+ __slots__ = ('source',)
- def __init__(self, query: str):
- self.query = query
+ def __init__(self, source: str):
+ self.source = source
def __expr__(self):
- return f'(by.source "{self.query}")'
+ return f'(by.source "{self.source}")'
@staticmethod
def __sig__():
return {
- 'query': 'query',
+ 'source': 'str',
'return': 'query'
}