From 3d2de00f4959c09aee02add967533c9063b99c70 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Mon, 30 Dec 2024 14:17:25 -0400 Subject: [PATCH] style: Apply linter fixes --- aider/commands.py | 4 +--- aider/main.py | 10 ++++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/aider/commands.py b/aider/commands.py index e9bc235b6..2bd602f3c 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -1119,9 +1119,7 @@ class Commands: self.io.tool_error("To use /voice you must provide an OpenAI API key.") return try: - self.voice = voice.Voice( - audio_format="wav", device_name=self.voice_input_device - ) + self.voice = voice.Voice(audio_format="wav", device_name=self.voice_input_device) except voice.SoundDeviceError: self.io.tool_error( "Unable to import `sounddevice` and/or `soundfile`, is portaudio installed?" diff --git a/aider/main.py b/aider/main.py index 4b0952d1a..2d0e55e84 100644 --- a/aider/main.py +++ b/aider/main.py @@ -113,7 +113,9 @@ def setup_git(git_root, io): except ANY_GIT_ERROR: pass elif cwd == Path.home(): - io.tool_warning("You should probably run aider in your project's directory, not your home dir.") + io.tool_warning( + "You should probably run aider in your project's directory, not your home dir." + ) return elif cwd and io.confirm_ask( "No git repo found, create one to track aider's changes (recommended)?" @@ -173,7 +175,7 @@ def check_gitignore(git_root, io, ask=True): existing_lines = content.splitlines() for pat in patterns: if pat not in existing_lines: - if '*' in pat or (Path(git_root) / pat).exists(): + if "*" in pat or (Path(git_root) / pat).exists(): patterns_to_add.append(pat) except OSError as e: io.tool_error(f"Error when trying to read {gitignore_file}: {e}") @@ -395,8 +397,8 @@ def sanity_check_repo(repo, io): error_msg = str(repo.git_repo_error) except UnicodeDecodeError as exc: error_msg = ( - f"Failed to read the Git repository. This issue is likely caused by a path encoded " - f"in a format different from the expected encoding \"{sys.getfilesystemencoding()}\".\n" + "Failed to read the Git repository. This issue is likely caused by a path encoded " + f'in a format different from the expected encoding "{sys.getfilesystemencoding()}".\n' f"Internal error: {str(exc)}" ) except ANY_GIT_ERROR as exc: