Skip to content

Commit

Permalink
error
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSecondComing123 committed Apr 25, 2022
1 parent 1cf0e7b commit 190a529
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 1 addition & 4 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
parser.add_argument(
"--code", "-c", type=str, help="optional argument to pass code/file name"
)
parser.add_argument(
'filename', nargs="?"
)


def main(code):
Expand All @@ -25,6 +28,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())
else:
shell()

Expand Down
1 change: 1 addition & 0 deletions unittests/testfiles/test1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
+1 1

0 comments on commit 190a529

Please sign in to comment.