handle no args properly

This commit is contained in:
Paul Gauthier 2023-05-11 20:56:09 -07:00
parent ed6ceae544
commit 5e593eb631
2 changed files with 2 additions and 2 deletions

View file

@ -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()

View file

@ -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):