From 0f8885183ad32077a8c1d67fbc984624010351e2 Mon Sep 17 00:00:00 2001 From: Erik Nyquist Date: Thu, 12 Oct 2023 16:55:06 -0700 Subject: [PATCH] Populate ArgumentParser 'description' field in generated programs --- duckargs/__init__.py | 2 +- tests/test_data/choices/expected_python.txt | 2 +- tests/test_data/flags_only/expected_python.txt | 2 +- tests/test_data/many_opts/expected_python.txt | 2 +- tests/test_data/normalize_names/expected_python.txt | 2 +- tests/test_data/options_only/expected_python.txt | 2 +- tests/test_data/positional_only/expected_python.txt | 2 +- tests/test_data/readme_example/expected_python.txt | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/duckargs/__init__.py b/duckargs/__init__.py index f9a095d..cd4cdbb 100644 --- a/duckargs/__init__.py +++ b/duckargs/__init__.py @@ -9,7 +9,7 @@ import argparse def main(): - parser = argparse.ArgumentParser(description='', + parser = argparse.ArgumentParser(description='A command-line program generated by duckargs', formatter_class=argparse.ArgumentDefaultsHelpFormatter) {1} diff --git a/tests/test_data/choices/expected_python.txt b/tests/test_data/choices/expected_python.txt index 43d65e7..0e0de3a 100644 --- a/tests/test_data/choices/expected_python.txt +++ b/tests/test_data/choices/expected_python.txt @@ -3,7 +3,7 @@ import argparse def main(): - parser = argparse.ArgumentParser(description='', + parser = argparse.ArgumentParser(description='A command-line program generated by duckargs', formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('pos1', help='a string') diff --git a/tests/test_data/flags_only/expected_python.txt b/tests/test_data/flags_only/expected_python.txt index c0ae141..95efb35 100644 --- a/tests/test_data/flags_only/expected_python.txt +++ b/tests/test_data/flags_only/expected_python.txt @@ -3,7 +3,7 @@ import argparse def main(): - parser = argparse.ArgumentParser(description='', + parser = argparse.ArgumentParser(description='A command-line program generated by duckargs', formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('-a', action='store_true', help='a flag') diff --git a/tests/test_data/many_opts/expected_python.txt b/tests/test_data/many_opts/expected_python.txt index 2a59a5a..0f71ba0 100644 --- a/tests/test_data/many_opts/expected_python.txt +++ b/tests/test_data/many_opts/expected_python.txt @@ -3,7 +3,7 @@ import argparse def main(): - parser = argparse.ArgumentParser(description='', + parser = argparse.ArgumentParser(description='A command-line program generated by duckargs', formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('pos1', help='a string') diff --git a/tests/test_data/normalize_names/expected_python.txt b/tests/test_data/normalize_names/expected_python.txt index dc5f81e..f419255 100644 --- a/tests/test_data/normalize_names/expected_python.txt +++ b/tests/test_data/normalize_names/expected_python.txt @@ -3,7 +3,7 @@ import argparse def main(): - parser = argparse.ArgumentParser(description='', + parser = argparse.ArgumentParser(description='A command-line program generated by duckargs', formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('-a', '--test_1', default=5464, type=int, help='an int value') diff --git a/tests/test_data/options_only/expected_python.txt b/tests/test_data/options_only/expected_python.txt index fc78a77..2563a6b 100644 --- a/tests/test_data/options_only/expected_python.txt +++ b/tests/test_data/options_only/expected_python.txt @@ -3,7 +3,7 @@ import argparse def main(): - parser = argparse.ArgumentParser(description='', + parser = argparse.ArgumentParser(description='A command-line program generated by duckargs', formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('-a', default=4, type=int, help='an int value') diff --git a/tests/test_data/positional_only/expected_python.txt b/tests/test_data/positional_only/expected_python.txt index bda3b90..3596d4a 100644 --- a/tests/test_data/positional_only/expected_python.txt +++ b/tests/test_data/positional_only/expected_python.txt @@ -3,7 +3,7 @@ import argparse def main(): - parser = argparse.ArgumentParser(description='', + parser = argparse.ArgumentParser(description='A command-line program generated by duckargs', formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('pos1', help='a string') diff --git a/tests/test_data/readme_example/expected_python.txt b/tests/test_data/readme_example/expected_python.txt index 67f0053..e6a854f 100644 --- a/tests/test_data/readme_example/expected_python.txt +++ b/tests/test_data/readme_example/expected_python.txt @@ -3,7 +3,7 @@ import argparse def main(): - parser = argparse.ArgumentParser(description='', + parser = argparse.ArgumentParser(description='A command-line program generated by duckargs', formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('positional_arg1', help='a string')