diff options
| author | Maxim Yurchuk <[email protected]> | 2024-11-13 16:32:39 +0300 |
|---|---|---|
| committer | Maxim Yurchuk <[email protected]> | 2024-11-13 16:32:39 +0300 |
| commit | 23387aafadce23ea77beffb2981e8c0e2f2a7f0a (patch) | |
| tree | 54b0f95fca1ad03d93f5a18abdfe98e8ab34b420 /contrib/python/ipython/py3/IPython/testing/tools.py | |
| parent | ee51155da394b56a8e3329d25a514422e5da7bc3 (diff) | |
| parent | 4ab23311f7a6d45ac318179569df9ba46fb9ab68 (diff) | |
Merge branch 'rightlib' into 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 ] |
