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


##########
dev/breeze/src/airflow_breeze/utils/add_back_references.py:
##########
@@ -52,26 +51,12 @@ def download_file(url):
 
 def construct_old_to_new_tuple_mapping(file_name: Path) -> list[tuple[str, 
str]]:
     old_to_new_tuples: list[tuple[str, str]] = []
-    with open(file_name) as f:
-        file_content = []
-        lines = f.readlines()
-        # Skip empty line
-
-        for line in lines:
-            if not line.strip():
-                continue
-
-            # Skip comments
-            if line.startswith("#"):
-                continue
-
-            line = line.rstrip()
-            file_content.append(line)
-
+    for line in file_name.read_text().splitlines():

Review Comment:
   I would use the `for line in f:` style instead.



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