diff --git a/cppwg/input/class_info.py b/cppwg/input/class_info.py index 531d6fb..60d71f3 100644 --- a/cppwg/input/class_info.py +++ b/cppwg/input/class_info.py @@ -186,7 +186,7 @@ def update_from_ns(self, source_ns: "namespace_t") -> None: # noqa: F821 # If class has default args, try to compress the template signature logger.warning( - f"Could not find declaration for class {class_name}: trying for a partial match." + f"Could not find declaration for class {class_name}: trying a partial match." ) # Try to find the class without default template args diff --git a/cppwg/input/module_info.py b/cppwg/input/module_info.py index c3b0a6d..88bd064 100644 --- a/cppwg/input/module_info.py +++ b/cppwg/input/module_info.py @@ -96,13 +96,13 @@ def sort_classes(self) -> None: for j in range(i + 1, n): cls_j = self.class_info_collection[j] - i_requires_j = cls_i.requires(cls_j) - j_requires_i = cls_j.requires(cls_i) - if cls_i.is_child_of(cls_j) or (i_requires_j and not j_requires_i): + i_req_j = cls_i.requires(cls_j) + j_req_i = cls_j.requires(cls_i) + if cls_i.is_child_of(cls_j) or (i_req_j and not j_req_i): # Position cls_i after all classes it depends on, # ignoring forward declaration cycles ii = j - elif cls_j.is_child_of(cls_i) or (j_requires_i and not i_requires_j): + elif cls_j.is_child_of(cls_i) or (j_req_i and not i_req_j): # Collect positions of cls_i's dependents j_pos.append(j) @@ -115,9 +115,9 @@ def sort_classes(self) -> None: self.class_info_collection.insert(ii, cls_i) # Move dependents into positions after ii - for j, idx in enumerate(j_pos): + for idx, j in enumerate(j_pos): if j > ii: - break # Rest of dependents already positioned after ii + break # Rest of dependents are already positioned after ii cls_j = self.class_info_collection.pop(j - 1 - idx) self.class_info_collection.insert(ii + idx, cls_j)