Skip to content

Commit

Permalink
hi you!
Browse files Browse the repository at this point in the history
  • Loading branch information
mathcat4 committed May 3, 2022
1 parent 190a529 commit 7667022
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
1 change: 0 additions & 1 deletion element_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ def concat(a: str, b: str):
"""Concat two strings"""
return a + b


def interleave(a: list, b: list):
"""Interleave a and b (two iterables)"""

Expand Down
11 changes: 4 additions & 7 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@

parser = argparse.ArgumentParser(description="CLI for Excuting Noxan")

# (file name not supported yet)
parser.add_argument("--code", "-c", type=str, help="optional argument to pass code")
parser.add_argument(
"--code", "-c", type=str, help="optional argument to pass code/file name"
)
parser.add_argument(
'filename', nargs="?"
"--file", "-f", type=str, help="optional argument to pass file name"
)


Expand All @@ -28,8 +25,8 @@ def cli():
args = parser.parse_args()
if args.code:
print(main(args.code))
elif args.filename is not None:
main(open(args.filename).readlines())
elif args.file:
print(main(open(args.file).read()))
else:
shell()

Expand Down
2 changes: 1 addition & 1 deletion unittests/testfiles/test1.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
+1 1
+1 -5 ½3

0 comments on commit 7667022

Please sign in to comment.