mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 17:55:01 +00:00
aider: Replaced Path.name
with os.path.basename
.
# Context: USER: replace the Path.name with os.path equiv ASSISTANT: To replace the `Path.name` with the equivalent `os.path` function, you can use `os.path.basename`. Here's the change: ```python aider/getinput.py <<<<<<< ORIGINAL short_fnames = [Path(fnames[0]).name] ======= short_fnames = [os.path.basename(fnames[0])] >>>>>>> UPDATED ```
This commit is contained in:
parent
000c917302
commit
33f7b81517
1 changed files with 1 additions and 2 deletions
|
@ -55,8 +55,7 @@ def get_input(history_file, fnames):
|
|||
common_prefix = os.path.commonprefix(fnames)
|
||||
short_fnames = [fname.replace(common_prefix, '', 1) for fname in fnames]
|
||||
else:
|
||||
short_fnames = [Path(fnames[0]).name]
|
||||
|
||||
short_fnames = [os.path.basename(fnames[0])]
|
||||
show = ' '.join(short_fnames)
|
||||
show += "\n> "
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue