Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First argument of Plan.call is positional only; touched up type hints… #21

Merged
merged 2 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
- ubuntu-latest
- windows-latest
python:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
Expand Down
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
Loading