mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 17:24:59 +00:00
style: Reformat code to improve linter compliance
This commit is contained in:
parent
93b86a8800
commit
c79db2581b
2 changed files with 17 additions and 6 deletions
|
@ -826,7 +826,10 @@ def get_parser(default_config_files, git_root):
|
||||||
"--notifications-command",
|
"--notifications-command",
|
||||||
metavar="COMMAND",
|
metavar="COMMAND",
|
||||||
default=None,
|
default=None,
|
||||||
help="Specify a command to run for notifications instead of the terminal bell. If not specified, a default command for your OS may be used.",
|
help=(
|
||||||
|
"Specify a command to run for notifications instead of the terminal bell. If not"
|
||||||
|
" specified, a default command for your OS may be used."
|
||||||
|
),
|
||||||
)
|
)
|
||||||
group.add_argument(
|
group.add_argument(
|
||||||
"--detect-urls",
|
"--detect-urls",
|
||||||
|
|
18
aider/io.py
18
aider/io.py
|
@ -962,11 +962,14 @@ class InputOutput:
|
||||||
def get_default_notification_command(self):
|
def get_default_notification_command(self):
|
||||||
"""Return a default notification command based on the operating system."""
|
"""Return a default notification command based on the operating system."""
|
||||||
import platform
|
import platform
|
||||||
|
|
||||||
system = platform.system()
|
system = platform.system()
|
||||||
|
|
||||||
if system == "Darwin": # macOS
|
if system == "Darwin": # macOS
|
||||||
return "osascript -e 'display notification \"Aider is waiting for your input\" with title \"Aider\"'"
|
return (
|
||||||
|
'osascript -e \'display notification "Aider is waiting for your input" with title'
|
||||||
|
' "Aider"\''
|
||||||
|
)
|
||||||
elif system == "Linux":
|
elif system == "Linux":
|
||||||
# Check for common Linux notification tools
|
# Check for common Linux notification tools
|
||||||
for cmd in ["notify-send", "zenity"]:
|
for cmd in ["notify-send", "zenity"]:
|
||||||
|
@ -978,8 +981,13 @@ class InputOutput:
|
||||||
return None # No known notification tool found
|
return None # No known notification tool found
|
||||||
elif system == "Windows":
|
elif system == "Windows":
|
||||||
# PowerShell notification
|
# PowerShell notification
|
||||||
return "powershell -command \"[System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms'); [System.Windows.Forms.MessageBox]::Show('Aider is waiting for your input', 'Aider')\""
|
return (
|
||||||
|
"powershell -command"
|
||||||
|
" \"[System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms');"
|
||||||
|
" [System.Windows.Forms.MessageBox]::Show('Aider is waiting for your input',"
|
||||||
|
" 'Aider')\""
|
||||||
|
)
|
||||||
|
|
||||||
return None # Unknown system
|
return None # Unknown system
|
||||||
|
|
||||||
def ring_bell(self):
|
def ring_bell(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue