Skip to content

Commit

Permalink
First argument of Plan.call is positional only; touched up type hints…
Browse files Browse the repository at this point in the history
…; updated html progress
  • Loading branch information
daniel-shields committed Feb 1, 2024
1 parent 28b374a commit a229e48
Show file tree
Hide file tree
Showing 5 changed files with 191 additions and 167 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ version = "1.0.1"
[tool.poetry.dependencies]
networkx = "^2.5"
nxv = "^0.1.3"
python = "^3.7"
python = "^3.8"

[tool.poetry.dev-dependencies]
black = "^22.8"
Expand Down
6 changes: 3 additions & 3 deletions src/uberjob/_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import operator
from contextlib import contextmanager
from threading import RLock
from typing import Callable, ContextManager, Tuple
from typing import Callable, Generator, Tuple

from uberjob import _builtins
from uberjob._util import validation
Expand Down Expand Up @@ -67,7 +67,7 @@ def _call(self, stack_frame, fn: Callable, *args, **kwargs) -> Call:
)
return call

def call(self, fn: Callable, *args, **kwargs) -> Call:
def call(self, fn: Callable, /, *args, **kwargs) -> Call:
"""
Add a function call to this :class:`~uberjob.Plan`.
Expand Down Expand Up @@ -158,7 +158,7 @@ def unpack(self, iterable, length: int) -> Tuple[Node, ...]:
)

@contextmanager
def scope(self, *args) -> ContextManager[None]:
def scope(self, *args) -> Generator[None, None, None]:
"""
A context manager for organizing a :class:`~uberjob.Plan`.
Expand Down
Loading

0 comments on commit a229e48

Please sign in to comment.