Skip to content

Commit

Permalink
Trying to get it to work
Browse files Browse the repository at this point in the history
  • Loading branch information
MrCurtis committed Feb 1, 2024
1 parent df48021 commit 34420ea
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/fk_graph/cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from argparse import ArgumentParser
from json import loads

from sqlalchemy import create_engine

Expand Down Expand Up @@ -29,6 +30,7 @@ def _parse_args():
parser.add_argument("--connection-string")
parser.add_argument("--table", required=True)
parser.add_argument("--primary-key", required=True)
parser.add_argument("--include-only", type=_to_list)
args = parser.parse_args()
if (
(not args.demo and args.connection_string is None)
Expand All @@ -39,3 +41,6 @@ def _parse_args():
"Exactly one of --demo and --connection-string should be used."
)
return args

def _to_list(json_input):
return loads(json_input)

0 comments on commit 34420ea

Please sign in to comment.