meel-ayush commented on code in PR #77119:
URL: https://github.com/apache/airflow/pull/77119#discussion_r4770207819


##########
dev/breeze/src/airflow_breeze/utils/import_graph.py:
##########
@@ -153,7 +154,7 @@ def _extract_edges(
                 edges.update(_resolve_imported_name(imported, alias.name, 
modules))
         elif isinstance(node, ast.Constant) and isinstance(node.value, str):
             value = node.value
-            if value.startswith(".") and DOTTED_NAME.match("x" + value):
+            if value.startswith(".") and RELATIVE_DOTTED_NAME.match(value):
                 level = len(value) - len(value.lstrip("."))
                 base = ".".join(package.split(".")[: len(package.split(".")) - 
level + 1])

Review Comment:
   Skipped resolution when level > len(package_parts) and added a test for 
negative-slice strings.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to