Skip to content

Commit 3ad1f71

Browse files
committed
TR updates, first round
1 parent 3e0f03a commit 3ad1f71

File tree

22 files changed

+44
-40
lines changed

22 files changed

+44
-40
lines changed

python-argparse/calc.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,19 @@ def div(a, b):
3131
}
3232

3333
add_parser = subparsers.add_parser("add", help="add two numbers a and b")
34-
add_parser.add_argument(*arg_template)
34+
add_parser.add_argument(**arg_template)
3535
add_parser.set_defaults(func=add)
3636

3737
sub_parser = subparsers.add_parser("sub", help="subtract two numbers a and b")
38-
sub_parser.add_argument(*arg_template)
38+
sub_parser.add_argument(**arg_template)
3939
sub_parser.set_defaults(func=sub)
4040

4141
mul_parser = subparsers.add_parser("mul", help="multiply two numbers a and b")
42-
mul_parser.add_argument(*arg_template)
42+
mul_parser.add_argument(**arg_template)
4343
mul_parser.set_defaults(func=mul)
4444

4545
div_parser = subparsers.add_parser("div", help="divide two numbers a and b")
46-
div_parser.add_argument(*arg_template)
46+
div_parser.add_argument(**arg_template)
4747
div_parser.set_defaults(func=div)
4848

4949
args = global_parser.parse_args()

python-argparse/cooking.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
arg_parser = argparse.ArgumentParser()
44

5-
arg_parser.add_argument("--vegies", nargs="+")
5+
arg_parser.add_argument("--veggies", nargs="+")
66
arg_parser.add_argument("--fruits", nargs="*")
77

88
args = arg_parser.parse_args()
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Hello CLI
2+
3+
My awesome Hello CLI application.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Hello CLI package."""
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Entry-point for the hello_cli package."""
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""CLI-related code for the Hello CLI package."""
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Back-end model for the hello_cli app."""
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[build-system]
2+
requires = ["setuptools>=61.0.0", "wheel"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "hello_cli"
7+
version = "0.0.1"
8+
description = "My awesome Hello CLI application"
9+
readme = "README.md"
10+
authors = [{ name = "Real Python", email = "[email protected]" }]
11+
12+
[project.scripts]
13+
hello_cli = "hello_cli.__main__:main"

python-argparse/hello_cli/requirements.txt

Whitespace-only changes.

python-argparse/hello_cli/tests/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)