Skip to content

Commit 83eb86e

Browse files
authored
chore: update install docs and typing fixes (#134)
* chore: update install docs and typing fixes * chore: bump ty minimum to 0.0.8 * chore: add weekly dependabot for uv * chore: add github-actions dependabot updates * chore: group github-actions dependabot updates * chore: avoid editable rtd docs * chore: use prek for lint * Fix docs.
1 parent e608ced commit 83eb86e

6 files changed

Lines changed: 21 additions & 10 deletions

File tree

.github/dependabot.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@ updates:
55
directory: "/"
66
schedule:
77
interval: "weekly"
8-
98
groups:
109
github-actions:
1110
patterns:
1211
- "*"
12+
- package-ecosystem: "uv"
13+
directory: "/"
14+
schedule:
15+
interval: "weekly"

docs/source/quickstart.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ pytask-parallel is available on [PyPI](https://pypi.org/project/pytask-parallel)
66
[Anaconda.org](https://anaconda.org/conda-forge/pytask-parallel). Install it with
77

88
```console
9-
$ pip install pytask-parallel
9+
$ uv add pytask-parallel
1010

1111
# or
1212

13-
$ conda install -c conda-forge pytask-parallel
13+
$ pixi add pytask-parallel
1414
```
1515

1616
## Usage

justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ typing:
2020

2121
# Run linting and formatting
2222
lint:
23-
uvx --with pre-commit-uv pre-commit run -a
23+
uvx prek run -a
2424

2525
# Build documentation
2626
docs:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ test = [
5050
]
5151
typing = [
5252
"pytask-parallel",
53-
"ty",
53+
"ty>=0.0.8",
5454
{include-group = "coiled"},
5555
{include-group = "dask"},
5656
]

src/pytask_parallel/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def parse_future_result(
5454

5555
exc_info = _parse_future_exception(future_exception)
5656
return WrapperResult(
57-
carry_over_products=None, # type: ignore[arg-type]
57+
carry_over_products=None,
5858
warning_reports=[],
5959
exc_info=exc_info,
6060
stdout="",

src/pytask_parallel/wrappers.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,22 @@ def wrap_task_in_thread(task: PTask, *, remote: bool, **kwargs: Any) -> WrapperR
6969
try:
7070
out = task.function(**kwargs)
7171
except Exception: # noqa: BLE001
72-
exc_info = sys.exc_info()
72+
exc_info_raw = sys.exc_info()
73+
exc_info = (
74+
cast(
75+
"tuple[type[BaseException], BaseException, TracebackType | str | None]",
76+
exc_info_raw,
77+
)
78+
if exc_info_raw[0] is not None
79+
else None
80+
)
7381
else:
7482
_handle_function_products(task, out, remote=remote)
7583
exc_info = None
7684
return WrapperResult(
77-
carry_over_products=None, # type: ignore[arg-type]
85+
carry_over_products=None,
7886
warning_reports=[],
79-
exc_info=exc_info, # type: ignore[arg-type]
87+
exc_info=exc_info,
8088
stdout="",
8189
stderr="",
8290
)
@@ -161,7 +169,7 @@ def wrap_task_in_process( # noqa: PLR0913
161169
captured_stderr_buffer.close()
162170

163171
return WrapperResult(
164-
carry_over_products=products, # type: ignore[arg-type]
172+
carry_over_products=products,
165173
warning_reports=warning_reports,
166174
exc_info=processed_exc_info,
167175
stdout=captured_stdout,

0 commit comments

Comments
 (0)