Skip to content

Commit e149bd2

Browse files
committed
Using typing-extensions for 3.9 support of @OverRide
1 parent 75ff4a3 commit e149bd2

File tree

5 files changed

+9
-4
lines changed

5 files changed

+9
-4
lines changed

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ dependencies = [
3232
'kiwipy[rmq]~=0.8.5',
3333
'nest_asyncio~=1.5,>=1.5.1',
3434
'pyyaml~=6.0',
35+
'typing-extensions~=4.12'
3536
]
3637

3738
[project.urls]

src/plumpy/persistence.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# -*- coding: utf-8 -*-
2+
from __future__ import annotations
3+
24
import abc
35
import asyncio
46
import collections

src/plumpy/process_states.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
Union,
1818
cast,
1919
final,
20-
override,
2120
)
2221

2322
import yaml
23+
from typing_extensions import override
2424
from yaml.loader import Loader
2525

2626
from plumpy.message import MessageBuilder, MessageType

src/plumpy/processes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,20 +285,20 @@ def recreate_from(
285285
if 'loop' in load_context:
286286
proc._loop = load_context.loop
287287
else:
288-
_LOGGER.warning(f'cannot find `loop` store in load_context, use default event loop')
288+
_LOGGER.warning('cannot find `loop` store in load_context, use default event loop')
289289
proc._loop = asyncio.get_event_loop()
290290

291291
proc._state = proc.recreate_state(saved_state['_state'])
292292

293293
if 'coordinator' in load_context:
294294
proc._coordinator = load_context.coordinator
295295
else:
296-
_LOGGER.warning(f'cannot find `coordinator` store in load_context')
296+
_LOGGER.warning('cannot find `coordinator` store in load_context')
297297

298298
if 'logger' in load_context:
299299
proc._logger = load_context.logger
300300
else:
301-
_LOGGER.warning(f'cannot find `logger` store in load_context')
301+
_LOGGER.warning('cannot find `logger` store in load_context')
302302

303303
# Need to call this here as things downstream may rely on us having the runtime variable above
304304
persistence.load_auto_persist_params(proc, saved_state, load_context)

uv.lock

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)