diff options
| author | AlexSm <[email protected]> | 2024-11-14 18:02:48 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-11-14 18:02:48 +0100 |
| commit | 42393178e3ca660b7b2da431bc4c768aadafe856 (patch) | |
| tree | 846127355de5d4088b4eefcab801b15c1ec4e454 /contrib/python/ipython/py3/IPython/testing/tools.py | |
| parent | c0af8d60b18390f8ef7b3ff878b822c43da62a54 (diff) | |
| parent | 51f34813686206b46686d84e96243def9f9da8df (diff) | |
Merge pull request #11568 from maximyurchuk/mergelibs-yurchuk-manual
Mergelibs yurchuk manual
Diffstat (limited to 'contrib/python/ipython/py3/IPython/testing/tools.py')
| -rw-r--r-- | contrib/python/ipython/py3/IPython/testing/tools.py | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/contrib/python/ipython/py3/IPython/testing/tools.py b/contrib/python/ipython/py3/IPython/testing/tools.py index b0303490482..aa54443ad06 100644 --- a/contrib/python/ipython/py3/IPython/testing/tools.py +++ b/contrib/python/ipython/py3/IPython/testing/tools.py @@ -36,7 +36,7 @@ from . import skipdoctest doctest_deco = skipdoctest.skip_doctest if sys.platform == 'win32' else dec.null_deco @doctest_deco -def full_path(startPath,files): +def full_path(startPath: str, files: list[str]) -> list[str]: """Make full paths for all the listed files, based on startPath. Only the base part of startPath is kept, since this routine is typically @@ -49,7 +49,7 @@ def full_path(startPath,files): Initial path to use as the base for the results. This path is split using os.path.split() and only its first component is kept. - files : string or list + files : list One or more files. Examples @@ -61,13 +61,8 @@ def full_path(startPath,files): >>> full_path('/foo',['a.txt','b.txt']) ['/a.txt', '/b.txt'] - If a single file is given, the output is still a list:: - - >>> full_path('/foo','a.txt') - ['/a.txt'] """ - - files = list_strings(files) + assert isinstance(files, list) base = os.path.split(startPath)[0] return [ os.path.join(base,f) for f in files ] |
