chore: update types + minor fixes

This commit is contained in:
relikd
2022-11-22 10:51:28 +01:00
parent b75102a211
commit e7ae59fadf
11 changed files with 46 additions and 34 deletions

View File

@@ -56,7 +56,7 @@ class Watcher:
def should_process(self, node: 'Record') -> bool:
''' Check if record path is being watched. '''
return node['_path'].startswith(self._root)
return str(node['_path']).startswith(self._root)
def process(self, record: 'Record') -> None:
'''
@@ -106,5 +106,5 @@ class Watcher:
del self._state
def __repr__(self) -> str:
return '<GroupByWatcher key="{}" enabled={} callback={}>'.format(
self.config.key, self.config.enabled, self.callback)
return '<GroupByWatcher key="{}" enabled={}>'.format(
self.config.key, self.config.enabled)