mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 17:24:59 +00:00
style: Fix formatting and string literals in commands.py
This commit is contained in:
parent
8bae297e5d
commit
61bcf04d15
1 changed files with 3 additions and 3 deletions
|
@ -906,16 +906,16 @@ class Commands:
|
|||
if args.strip():
|
||||
filename = args.strip()
|
||||
ext = os.path.splitext(filename)[1].lower()
|
||||
if ext in ('.jpg', '.jpeg', '.png'):
|
||||
if ext in (".jpg", ".jpeg", ".png"):
|
||||
basename = filename
|
||||
else:
|
||||
basename = f"{filename}.png"
|
||||
else:
|
||||
basename = "clipboard_image.png"
|
||||
|
||||
|
||||
temp_dir = tempfile.mkdtemp()
|
||||
temp_file_path = os.path.join(temp_dir, basename)
|
||||
image_format = 'PNG' if basename.lower().endswith('.png') else 'JPEG'
|
||||
image_format = "PNG" if basename.lower().endswith(".png") else "JPEG"
|
||||
image.save(temp_file_path, image_format)
|
||||
|
||||
abs_file_path = Path(temp_file_path).resolve()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue