Skip to content

Commit e0ea7ac

Browse files
committed
Fix test errors
1 parent a8338ec commit e0ea7ac

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

colcon_python_setup_py/package_identification/out_of_process.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,32 @@
33

44

55
class OutOfProcessError(RuntimeError):
6-
"""An exception raised from a different process"""
6+
"""An exception raised from a different process."""
77

88
def __init__(self, description):
9+
"""
10+
Initialize self.
11+
12+
:param description: The full formatted exception
13+
"""
914
self.description = description
1015

1116
def __str__(self):
17+
"""Return str(self)."""
1218
return self.description
1319

1420

1521
def out_of_process(fn):
16-
"""Decorator to wrap a function call in a subprocess"""
22+
"""
23+
Wrap a function in a subprocess.
24+
25+
Wrapped function will behave the same as the original function, except
26+
it will run in a different process and exceptions will be wrapped in an
27+
OutOfProcessError
1728
29+
:param fn: Function to run in a separate process
30+
:return: Function that mimics `fn`.
31+
"""
1832
@functools.wraps(fn)
1933
def wrapper(*args, **kwargs):
2034
import multiprocessing

colcon_python_setup_py/package_identification/python_setup_py.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,4 +257,4 @@ def get_setup_information(setup_py: Path, *, env: Mapping[str, str]):
257257
except Exception as e:
258258
raise RuntimeError(
259259
"Failed to dry run setup script '{setup_py}': "
260-
.format_map(locals()) + traceback.format_exc()) from e
260+
.format_map(locals()) + traceback.format_exc()) from e

test/spell_check.words

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@ apache
22
chdir
33
colcon
44
distclass
5+
functools
56
iterdir
6-
kwds
77
noqa
88
pathlib
99
picklable
1010
plugin
1111
pytest
1212
pythonpath
13+
recv
1314
rtype
1415
runpy
1516
scspell

0 commit comments

Comments
 (0)