Skip to content

Commit 87d0c6f

Browse files
authored
Some housekeeping. (#57)
1 parent d7fb5e5 commit 87d0c6f

File tree

4 files changed

+16
-38
lines changed

4 files changed

+16
-38
lines changed

CHANGES.md

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ releases are available on [PyPI](https://pypi.org/project/pytask-parallel) and
88
## 0.3.1 - 2023-xx-xx
99

1010
- {pull}`56` refactors the `ProcessPoolExecutor`.
11+
- {pull}`57` does some housekeeping.
1112

1213
## 0.3.0 - 2023-01-23
1314

pyproject.toml

+12
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,15 @@ extend-ignore = [
6565

6666
[tool.ruff.pydocstyle]
6767
convention = "numpy"
68+
69+
70+
[tool.pytest.ini_options]
71+
# Do not add src since it messes with the loading of pytask-parallel as a plugin.
72+
testpaths = ["test"]
73+
markers = [
74+
"wip: Tests that are work-in-progress.",
75+
"unit: Flag for unit tests which target mainly a single function.",
76+
"integration: Flag for integration tests which may comprise of multiple unit tests.",
77+
"end_to_end: Flag for tests that cover the whole program.",
78+
]
79+
norecursedirs = [".idea", ".tox"]

src/pytask_parallel/execute.py

+3-7
Original file line numberDiff line numberDiff line change
@@ -154,14 +154,10 @@ def pytask_execute_build(session: Session) -> bool | None: # noqa: C901, PLR091
154154

155155

156156
def _parse_future_exception(
157-
exception: BaseException | None,
157+
exc: BaseException | None,
158158
) -> tuple[type[BaseException], BaseException, TracebackType] | None:
159-
"""Parse a future exception."""
160-
return (
161-
None
162-
if exception is None
163-
else (type(exception), exception, exception.__traceback__)
164-
)
159+
"""Parse a future exception into the format of ``sys.exc_info``."""
160+
return None if exc is None else (type(exc), exc, exc.__traceback__)
165161

166162

167163
class ProcessesNameSpace:

tox.ini

-31
Original file line numberDiff line numberDiff line change
@@ -18,34 +18,3 @@ conda_channels =
1818
commands =
1919
pip install --no-deps -e .
2020
pytest {posargs}
21-
22-
[flake8]
23-
docstring-convention = numpy
24-
ignore =
25-
D
26-
E203 ; ignores whitespace around : which is enforced by Black.
27-
W503 ; ignores linebreak before binary operator which is enforced by Black.
28-
PT006 ; ignores that parametrizing tests with tuple argument names is preferred.
29-
max-line-length = 88
30-
pytest-mark-no-parentheses = true
31-
warn-symbols =
32-
pytest.mark.wip = Remove 'wip' mark for tests.
33-
pytest.mark.skip = Remove 'skip' flag for tests.
34-
35-
[pytest]
36-
testpaths =
37-
# Do not add src since it messes with the loading of pytask-parallel as a plugin.
38-
tests
39-
addopts = --doctest-modules
40-
filterwarnings =
41-
ignore: the imp module is deprecated in favour of importlib
42-
ignore: The (symbol|parser) module is deprecated and will be removed in future
43-
ignore: Using or importing the ABCs from 'collections' instead of from
44-
markers =
45-
wip: Tests that are work-in-progress.
46-
unit: Flag for unit tests which target mainly a single function.
47-
integration: Flag for integration tests which may comprise of multiple unit tests.
48-
end_to_end: Flag for tests that cover the whole program.
49-
norecursedirs =
50-
.idea
51-
.tox

0 commit comments

Comments
 (0)