diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2024-11-09 12:07:32 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2024-11-09 12:17:11 +0300 |
commit | 381a9a45520ba56577e90032e086e0168a03b956 (patch) | |
tree | f49a7f9feff6df2c4916cf20205e9c22cb26dfd2 /contrib/python/ipython/py3/IPython/testing | |
parent | 66839121782766f516d9a33982e1968d319e3395 (diff) | |
download | ydb-381a9a45520ba56577e90032e086e0168a03b956.tar.gz |
Intermediate changes
commit_hash:2e32c346f257520a6c3629b88dc628744d3d3386
Diffstat (limited to 'contrib/python/ipython/py3/IPython/testing')
-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 ] |