diff --git a/distributed/client.py b/distributed/client.py index bc39b956d2..415394ab17 100644 --- a/distributed/client.py +++ b/distributed/client.py @@ -3094,7 +3094,6 @@ async def _run( elif resp["status"] == "error": # Exception raised by the remote function _, exc, tb = clean_exception(**resp) - assert exc is not None exc = exc.with_traceback(tb) else: assert resp["status"] == "OK" @@ -3250,20 +3249,8 @@ def _get_computation_code( "|".join([f"(?:{mod})" for mod in ignore_modules]) ) if ignore_files: - # Given ignore-files = [foo], match: - # /path/to/foo - # /path/to/foo.py[c] - # /path/to/foo/bar.py[c] - # \path\to\foo - # \path\to\foo.py[c] - # \path\to\foo\bar.py[c] - # - # Do not match files that have 'foo' as a substring, - # unless the user explicitly states '.*foo.*'. - ignore_files_or = "|".join(mod for mod in ignore_files) fname_pattern = re.compile( - rf".*[\\/]({ignore_files_or})([\\/]|\.pyc?$|$)" - rf"|$" + r".*[\\/](" + "|".join(mod for mod in ignore_files) + r")([\\/]|$)" ) else: # stacklevel 0 or less - shows dask internals which likely isn't helpful