@@ -416,9 +416,7 @@ class Node(graphene.Interface):
416
416
updated_datetime = graphene .String ()
417
417
418
418
# These fields depend on these columns being loaded
419
- fields_depend_on_columns = {
420
- "project_id" : {"program" , "code" },
421
- }
419
+ fields_depend_on_columns = {"project_id" : {"program" , "code" }}
422
420
423
421
424
422
def resolve_node (self , info , ** args ):
@@ -549,7 +547,7 @@ def get_node_class_property_args(cls, not_props_io={}):
549
547
args_not = {}
550
548
args_not .update (get_node_class_property_attrs (cls ))
551
549
not_props_io [not_props_io_name ] = type (
552
- not_props_io_name , (graphene .InputObjectType ,), args_not ,
550
+ not_props_io_name , (graphene .InputObjectType ,), args_not
553
551
)
554
552
globals ()[not_props_io [not_props_io_name ].__name__ ] = not_props_io [
555
553
not_props_io_name
@@ -689,7 +687,7 @@ def get_node_class_special_attrs(cls):
689
687
def get_node_class_link_attrs (cls ):
690
688
attrs = {
691
689
name : graphene .List (
692
- __name__ + "." + link ["type" ].label , args = get_node_class_args (link ["type" ]),
690
+ __name__ + "." + link ["type" ].label , args = get_node_class_args (link ["type" ])
693
691
)
694
692
for name , link in cls ._pg_edges .items ()
695
693
}
@@ -703,7 +701,7 @@ def resolve__related_cases(self, info, args):
703
701
704
702
q = with_path_to (
705
703
get_authorized_query (md .Case ),
706
- {"type" : cls .label , "id" : self .id , },
704
+ {"type" : cls .label , "id" : self .id },
707
705
info ,
708
706
name = "related_cases" ,
709
707
)
@@ -735,7 +733,7 @@ def resolve_transaction_logs_count(self, info, **args):
735
733
736
734
attrs ["resolve__transaction_logs_count" ] = resolve_transaction_logs_count
737
735
attrs ["_transaction_logs_count" ] = graphene .Field (
738
- graphene .Int , args = transaction .get_transaction_log_args (),
736
+ graphene .Int , args = transaction .get_transaction_log_args ()
739
737
)
740
738
741
739
def resolve_transaction_logs (self , info , ** args ):
@@ -744,7 +742,7 @@ def resolve_transaction_logs(self, info, **args):
744
742
745
743
attrs ["resolve__transaction_logs" ] = resolve_transaction_logs
746
744
attrs ["_transaction_logs" ] = graphene .List (
747
- transaction .TransactionLog , args = transaction .get_transaction_log_args (),
745
+ transaction .TransactionLog , args = transaction .get_transaction_log_args ()
748
746
)
749
747
750
748
_links_args = get_node_interface_args ()
@@ -948,9 +946,7 @@ def resolver(self, info, cls=cls, gql_object=gql_object, **args):
948
946
capp .logger .exception (e )
949
947
raise
950
948
951
- field = graphene .Field (
952
- graphene .List (gql_object ), args = get_node_class_args (cls ),
953
- )
949
+ field = graphene .Field (graphene .List (gql_object ), args = get_node_class_args (cls ))
954
950
955
951
res_name = "resolve_{}" .format (name )
956
952
resolver .__name__ = res_name
@@ -1062,7 +1058,7 @@ def instantiate_graphene(t):
1062
1058
1063
1059
# add required node fields
1064
1060
DataNode .shared_fields .update (
1065
- {"id" : graphene .String (), "type" : graphene .String (), }
1061
+ {"id" : graphene .String (), "type" : graphene .String ()}
1066
1062
)
1067
1063
1068
1064
return DataNode .shared_fields
@@ -1085,7 +1081,7 @@ def get_datanode_interface_args():
1085
1081
args = get_base_node_args ()
1086
1082
args .update (get_datanode_fields_dict ())
1087
1083
args .update (
1088
- {"of_type" : graphene .List (graphene .String ), "project_id" : graphene .String (), }
1084
+ {"of_type" : graphene .List (graphene .String ), "project_id" : graphene .String ()}
1089
1085
)
1090
1086
return args
1091
1087
0 commit comments