Skip to content

Commit 5765777

Browse files
committed
Fix type annotation in JSONLines
1 parent 0d8df2e commit 5765777

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,7 @@ repos:
3030
hooks:
3131
- id: mypy
3232
files: 'src/.*\.py$'
33-
additional_dependencies: [types-requests, types-pkg_resources, types-pyyaml]
33+
additional_dependencies:
34+
- types-requests
35+
- types-pkg_resources
36+
- types-pyyaml

src/zocalo/service/jsonlines.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ class JSONLines(CommonService):
1717
# Logger name
1818
_logger_name = "zocalo.service.jsonlines"
1919

20+
_data: dict[Path, list[tuple[dict, dict]]]
21+
2022
def initializing(self):
2123
self._register_idle(1, self.process_messages)
2224
workflows.recipe.wrap_subscribe(
@@ -29,7 +31,7 @@ def initializing(self):
2931
prefetch_count=100,
3032
)
3133
self._lock = threading.Lock()
32-
self._data: dict[Path, list[tuple(dict, dict)]] = {}
34+
self._data = {}
3335

3436
def receive_msg(
3537
self, rw: workflows.recipe.RecipeWrapper, header: dict, message: dict

0 commit comments

Comments
 (0)