mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 02:05:00 +00:00
style: Format code with linter and improve whitespace consistency
This commit is contained in:
parent
47254be254
commit
95e1fe0446
1 changed files with 7 additions and 5 deletions
12
aider/io.py
12
aider/io.py
|
@ -963,9 +963,9 @@ 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
|
||||||
# Check for terminal-notifier first
|
# Check for terminal-notifier first
|
||||||
if shutil.which("terminal-notifier"):
|
if shutil.which("terminal-notifier"):
|
||||||
|
@ -992,7 +992,7 @@ class InputOutput:
|
||||||
" [System.Windows.Forms.MessageBox]::Show('Aider is waiting for your input',"
|
" [System.Windows.Forms.MessageBox]::Show('Aider is waiting for your input',"
|
||||||
" 'Aider')\""
|
" 'Aider')\""
|
||||||
)
|
)
|
||||||
|
|
||||||
return None # Unknown system
|
return None # Unknown system
|
||||||
|
|
||||||
def ring_bell(self):
|
def ring_bell(self):
|
||||||
|
@ -1000,9 +1000,11 @@ class InputOutput:
|
||||||
if self.bell_on_next_input and self.notifications:
|
if self.bell_on_next_input and self.notifications:
|
||||||
if self.notifications_command:
|
if self.notifications_command:
|
||||||
try:
|
try:
|
||||||
result = subprocess.run(self.notifications_command, shell=True, capture_output=True)
|
result = subprocess.run(
|
||||||
|
self.notifications_command, shell=True, capture_output=True
|
||||||
|
)
|
||||||
if result.returncode != 0 and result.stderr:
|
if result.returncode != 0 and result.stderr:
|
||||||
error_msg = result.stderr.decode('utf-8', errors='replace')
|
error_msg = result.stderr.decode("utf-8", errors="replace")
|
||||||
self.tool_warning(f"Failed to run notifications command: {error_msg}")
|
self.tool_warning(f"Failed to run notifications command: {error_msg}")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.tool_warning(f"Failed to run notifications command: {e}")
|
self.tool_warning(f"Failed to run notifications command: {e}")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue