uranusjr commented on code in PR #33626:
URL: https://github.com/apache/airflow/pull/33626#discussion_r1302422880


##########
dev/breeze/src/airflow_breeze/utils/add_back_references.py:
##########
@@ -119,17 +104,15 @@ def generate_back_references(link: str, base_path: Path):
     old_to_new.append(("index.html", "security.html"))
     old_to_new.append(("security.html", "security/security-model.html"))
 
-    versions = [f.path.split("/")[-1] for f in os.scandir(base_path) if 
f.is_dir()]
-    for version in versions:
-        print(f"Processing {base_path}, version: {version}")
-        versioned_provider_path = base_path / version
+    versioned_provider_paths = [p for p in base_path.iterdir() if p.is_dir()]
+    for versioned_provider_path in versioned_provider_paths:

Review Comment:
   I think we can avoid building the intermediate list here.



-- 
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