@@ -104,17 +104,20 @@ def _to_expanded_json(self, key, value):
104104 if ':' in short_key :
105105 prefix , short_key = short_key .split (':' , 1 )
106106 ctx_value = self .ld_proc .get_context_value (self .active_ctx , prefix , "@id" )
107- active_ctx = self .ld_proc .process_context (self .active_ctx , [ctx_value ], {"documentLoader" : bundled_loader })
107+ active_ctx = self .ld_proc .process_context (self .active_ctx , [ctx_value ],
108+ {"documentLoader" : bundled_loader })
108109 else :
109110 active_ctx = self .active_ctx
110111 ld_type = self .ld_proc .get_context_value (active_ctx , short_key , "@type" )
111112 if ld_type == "@id" :
112113 ld_value = [{"@id" : value }]
113114 ld_output = "expanded_json"
114115 else :
115- ld_value , ld_output = self .ld_proc .apply_typemap (value , "expanded_json" , "json" , parent = self , key = key )
116+ ld_value , ld_output = self .ld_proc .apply_typemap (value , "expanded_json" , "json" ,
117+ parent = self , key = key )
116118 if ld_output == "json" :
117- ld_value = self .ld_proc .expand (ld_value , {"expandContext" : self .full_context , "documentLoader" : bundled_loader })
119+ ld_value = self .ld_proc .expand (ld_value , {"expandContext" : self .full_context ,
120+ "documentLoader" : bundled_loader })
118121 elif ld_output != "expanded_json" :
119122 raise TypeError (f"Cannot convert { type (value )} " )
120123
0 commit comments