From 5e593eb631bd591590bb93e293d1d373e769b7e1 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Thu, 11 May 2023 20:56:09 -0700 Subject: [PATCH] handle no args properly --- aider/main.py | 2 +- tests/test_main.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/aider/main.py b/aider/main.py index 11d4ff9f0..6692219cd 100644 --- a/aider/main.py +++ b/aider/main.py @@ -6,7 +6,7 @@ from aider.coder import Coder def main(args=None): - if not args: + if args is None: args = sys.argv[1:] load_dotenv() diff --git a/tests/test_main.py b/tests/test_main.py index 646e9111c..6aa05e97d 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -13,7 +13,7 @@ class TestMain(TestCase): with open(os.devnull, "r") as dev_null: save_stdin = sys.stdin sys.stdin = dev_null - main() + main([]) sys.stdin = save_stdin def test_main_with_empty_dir_new_file(self):