@@ -685,22 +685,25 @@ def find_leafref_path_target_paths(self, leafref_path: str) -> List[str]:
685685 raise self .error ("leafref_path not found" )
686686
687687 node_set = ffi .new ("struct ly_set **" )
688- if (lib .lysc_node_lref_targets (node , node_set ) != lib .LY_SUCCESS or
689- node_set [0 ] == ffi .NULL or node_set [0 ].count == 0 ):
688+ if (
689+ lib .lysc_node_lref_targets (node , node_set ) != lib .LY_SUCCESS
690+ or node_set [0 ] == ffi .NULL
691+ or node_set [0 ].count == 0 ):
690692 raise self .error ("leafref_path does not contain any leafref targets" )
691693
692694 node_set = node_set [0 ]
693695 for i in range (node_set .count ):
694- path = lib .lysc_path (node_set .snodes [i ], lib .LYSC_PATH_DATA , ffi .NULL , 0 );
696+ path = lib .lysc_path (node_set .snodes [i ], lib .LYSC_PATH_DATA , ffi .NULL , 0 )
695697 out .append (c2str (path ))
696698 lib .free (path )
697699
698700 lib .ly_set_free (node_set , ffi .NULL )
699701
700702 return out
701703
702-
703- def find_backlinks_paths (self , match_path : str = None , match_ancestors : bool = False ) -> List [str ]:
704+ def find_backlinks_paths (
705+ self , match_path : str = None , match_ancestors : bool = False
706+ ) -> List [str ]:
704707 """
705708 Search entire schema for nodes that contain leafrefs and return as a
706709 list of schema node paths.
@@ -739,13 +742,18 @@ def find_backlinks_paths(self, match_path: str = None, match_ancestors: bool = F
739742 raise self .error ("match_path not found" )
740743
741744 node_set = ffi .new ("struct ly_set **" )
742- if (lib .lysc_node_lref_backlinks (self .cdata , match_node , match_ancestors , node_set )
743- != lib .LY_SUCCESS or node_set [0 ] == ffi .NULL or node_set [0 ].count == 0 ):
745+ if (
746+ lib .lysc_node_lref_backlinks (
747+ self .cdata , match_node , match_ancestors , node_set
748+ )
749+ != lib .LY_SUCCESS
750+ or node_set [0 ] == ffi .NULL
751+ or node_set [0 ].count == 0 ):
744752 raise self .error ("backlinks not found" )
745753
746754 node_set = node_set [0 ]
747755 for i in range (node_set .count ):
748- path = lib .lysc_path (node_set .snodes [i ], lib .LYSC_PATH_DATA , ffi .NULL , 0 );
756+ path = lib .lysc_path (node_set .snodes [i ], lib .LYSC_PATH_DATA , ffi .NULL , 0 )
749757 out .append (c2str (path ))
750758 lib .free (path )
751759
0 commit comments