@@ -73,10 +73,10 @@ def list_nodes(self , # L
7373
7474 node_types = self .repository .node_types_load () # Registered types
7575 for nt in node_types :
76- seen_types .add (str ( nt .name ) )
76+ seen_types .add (nt .name )
7777
7878 for node_info in all_nodes : # Collect types from .issues files too
79- nt_str = str ( node_info .node_type )
79+ nt_str = node_info .node_type
8080 if nt_str :
8181 seen_types .add (nt_str )
8282
@@ -96,13 +96,13 @@ def list_nodes_for_type(self , # L
9696 all_nodes = self .repository .nodes_list_all (root_path = root_path ) # Phase 2 (B10/B17): Recursive with filter
9797
9898 for node_info in all_nodes :
99- if str ( node_info .node_type ) != str ( node_type ) :
99+ if node_info .node_type != node_type :
100100 continue
101101
102102 node = self .repository .node_load_by_path (node_info .path )
103103
104104 if node is None : # Fall back to .issues file cache
105- node = self .repository .issues_files_find_node_by_label (str ( node_info .label ) )
105+ node = self .repository .issues_files_find_node_by_label (node_info .label )
106106
107107 if node :
108108 summary = Schema__Node__Summary (label = node .label ,
@@ -117,7 +117,7 @@ def get_current_root_path(self) -> Safe_Str__File__Path: # P
117117 if self .root_selection_service is None :
118118 return None
119119
120- root_str = str ( self .root_selection_service .current_root )
120+ root_str = self .root_selection_service .current_root
121121 if root_str :
122122 return Safe_Str__File__Path (root_str )
123123
@@ -148,15 +148,15 @@ def create_node(self , # C
148148 request : Schema__Node__Create__Request
149149 ) -> Schema__Node__Create__Response :
150150 # Validate title is not empty
151- if str ( request .title ) .strip () == '' :
151+ if request .title .strip () == '' :
152152 return Schema__Node__Create__Response (success = False ,
153153 message = 'Title is required' )
154154
155155 # Validate node type exists
156156 node_types = self .repository .node_types_load ()
157157 node_type_def = None
158158 for nt in node_types :
159- if str ( nt .name ) == str ( request .node_type ) :
159+ if nt .name == request .node_type :
160160 node_type_def = nt
161161 break
162162
@@ -318,8 +318,8 @@ def type_to_label_prefix(self, node_type: str) -> str: # P
318318 def parse_label_to_type (self , # Phase 2 (B22): Extract type from label
319319 label : Safe_Str__Node_Label
320320 ) -> Safe_Str__Node_Type :
321- label_str = str ( label )
322- known_types = [str ( nt .name ) for nt in self .repository .node_types_load ()]
321+ label_str = label
322+ known_types = [nt .name for nt in self .repository .node_types_load ()]
323323
324324 for node_type in sorted (known_types , key = len , reverse = True ): # Longest first so 'user-story' matches before 'user'
325325 prefix = self .type_to_label_prefix (node_type )
@@ -395,7 +395,7 @@ def traverse_graph(self , # R
395395 links : list
396396 ) -> None :
397397
398- label_str = str ( node .label )
398+ label_str = node .label
399399 if label_str in visited or depth < 0 :
400400 return
401401
@@ -412,7 +412,7 @@ def traverse_graph(self , # R
412412 if node .links :
413413 for link in node .links :
414414 target_label = link .target_label
415- if target_label and str ( target_label ) not in visited :
415+ if target_label and target_label not in visited :
416416 target_node = self .resolve_link_target (link )
417417 if target_node :
418418 links .append (Schema__Graph__Link (source = node .label ,
@@ -423,7 +423,7 @@ def traverse_graph(self , # R
423423 # Find and traverse incoming links
424424 incoming = self .find_incoming_links (node .label )
425425 for source_node , link_type in incoming :
426- if str ( source_node .label ) not in visited :
426+ if source_node .label not in visited :
427427 links .append (Schema__Graph__Link (source = source_node .label ,
428428 target = node .label ,
429429 link_type = link_type ))
@@ -452,21 +452,21 @@ def find_incoming_links(self , # F
452452 label : Safe_Str__Node_Label
453453 ) -> List [tuple ]:
454454 incoming = []
455- label_str = str ( label )
455+ label_str = label
456456 node_types = self .repository .node_types_load ()
457457
458458 for nt in node_types :
459459 labels = self .repository .nodes_list_labels (nt .name )
460460 for node_label in labels :
461- if str ( node_label ) == label_str : # Skip self
461+ if node_label == label_str : # Skip self
462462 continue
463463
464464 node = self .repository .node_load (node_type = nt .name ,
465465 label = node_label )
466466 if node and node .links :
467467 for link in node .links :
468- if link .target_label and str ( link .target_label ) == label_str :
469- incoming .append ((node , str ( link .verb ) ))
468+ if link .target_label and link .target_label == label_str :
469+ incoming .append ((node , link .verb ))
470470 break # Only add node once
471471
472472 return incoming
0 commit comments