@@ -416,6 +416,8 @@ def stream_viewer(self,line):
416
416
viewer .show ()
417
417
418
418
@line_magic
419
+ @needs_local_scope
420
+ @display_exceptions
419
421
def statistics (self , line , local_ns : dict = None ):
420
422
parser = argparse .ArgumentParser ()
421
423
parser .add_argument ('language' , nargs = '?' , type = str .lower , default = "propertygraph" ,
@@ -453,10 +455,11 @@ def statistics(self, line, local_ns: dict = None):
453
455
if not args .silent :
454
456
print (json .dumps (statistics_res_json , indent = 2 ))
455
457
456
- if args .store_to != '' and local_ns is not None :
457
- local_ns [args .store_to ] = statistics_res_json
458
+ store_to_ns (args .store_to , statistics_res_json , local_ns )
458
459
459
460
@line_magic
461
+ @needs_local_scope
462
+ @display_exceptions
460
463
def summary (self , line , local_ns : dict = None ):
461
464
parser = argparse .ArgumentParser ()
462
465
parser .add_argument ('language' , nargs = '?' , type = str .lower , default = "propertygraph" ,
@@ -484,8 +487,7 @@ def summary(self, line, local_ns: dict = None):
484
487
if not args .silent :
485
488
print (json .dumps (summary_res_json , indent = 2 ))
486
489
487
- if args .store_to != '' and local_ns is not None :
488
- local_ns [args .store_to ] = summary_res_json
490
+ store_to_ns (args .store_to , summary_res_json , local_ns )
489
491
490
492
@line_magic
491
493
def graph_notebook_host (self , line ):
@@ -1903,8 +1905,7 @@ def load_ids(self, line, local_ns: dict = None):
1903
1905
vbox = widgets .VBox (labels )
1904
1906
display (vbox )
1905
1907
1906
- if args .store_to != '' and local_ns is not None :
1907
- local_ns [args .store_to ] = res
1908
+ store_to_ns (args .store_to , res , local_ns )
1908
1909
1909
1910
@line_magic
1910
1911
@display_exceptions
@@ -1934,8 +1935,7 @@ def load_status(self, line, local_ns: dict = None):
1934
1935
if not args .silent :
1935
1936
print (json .dumps (res , indent = 2 ))
1936
1937
1937
- if args .store_to != '' and local_ns is not None :
1938
- local_ns [args .store_to ] = res
1938
+ store_to_ns (args .store_to , res , local_ns )
1939
1939
1940
1940
@line_magic
1941
1941
@display_exceptions
@@ -1984,8 +1984,7 @@ def cancel_load(self, line, local_ns: dict = None):
1984
1984
else :
1985
1985
print ("No cancellable load jobs were found." )
1986
1986
1987
- if args .store_to != '' and local_ns is not None :
1988
- local_ns [args .store_to ] = raw_res
1987
+ store_to_ns (args .store_to , raw_res , local_ns )
1989
1988
1990
1989
@line_magic
1991
1990
@display_exceptions
0 commit comments