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:
Paul Gauthier 2023-05-10 10:08:16 -07:00
parent 000c917302
commit 33f7b81517

View file

@ -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> "