diff --git a/src/sql/cmd/columns.py b/src/sql/cmd/columns.py index 25b1ba461..7d1ac3e59 100644 --- a/src/sql/cmd/columns.py +++ b/src/sql/cmd/columns.py @@ -26,5 +26,4 @@ def columns(others): parser.add_argument("-s", "--schema", type=str, help="Schema name", required=False) args = parser.parse_args(others) - return inspect.get_columns(name=sanitize_identifier(args.table), schema=args.schema) diff --git a/src/sql/cmd/snippets.py b/src/sql/cmd/snippets.py index 8fd8c58fc..fe80b3c36 100644 --- a/src/sql/cmd/snippets.py +++ b/src/sql/cmd/snippets.py @@ -44,6 +44,7 @@ def snippets(others): ---------- others : str, A string containing the command line arguments. + """ parser = CmdParser() parser.add_argument( diff --git a/src/sql/cmd/test.py b/src/sql/cmd/test.py index 8a879d805..0390ed952 100644 --- a/src/sql/cmd/test.py +++ b/src/sql/cmd/test.py @@ -84,8 +84,6 @@ def test(others): This function takes in a string containing command line arguments, parses them to extract the table name, column name, and conditions to return if those conditions are satisfied in that table - It also uses the kernel namespace for expanding arguments declared as - variables. Parameters ---------- diff --git a/src/sql/magic.py b/src/sql/magic.py index bb9f60294..0384e6077 100644 --- a/src/sql/magic.py +++ b/src/sql/magic.py @@ -409,8 +409,8 @@ def interactive_execute_wrapper(**kwargs): command = SQLCommand(self, user_ns, line, cell) # args.line: contains the line after the magic with all options removed + args = command.args - # util.expand_args_cmd(args, user_ns) if args.section and args.alias: raise exceptions.UsageError( diff --git a/src/sql/magic_cmd.py b/src/sql/magic_cmd.py index d67923767..163a062e3 100644 --- a/src/sql/magic_cmd.py +++ b/src/sql/magic_cmd.py @@ -132,4 +132,5 @@ def execute(self, cmd_name="", others="", cell="", local_ns=None): } cmd = router.get(cmd_name) - return cmd(others) + if cmd: + return cmd(others)