potiuk commented on code in PR #59261:
URL: https://github.com/apache/airflow/pull/59261#discussion_r2604791989


##########
dev/breeze/src/airflow_breeze/utils/packages.py:
##########
@@ -1241,8 +1241,8 @@ def _update_dependency_line_with_new_version(
     new_constraint = f'"{provider_package_name}>={new_version}"'
     updated_line = line.replace(old_constraint, new_constraint)
 
-    # Remove the "# use next version" comment after upgrading
-    updated_line = updated_line.replace(" # use next version", "")
+    # remove the comment starting with '# use next version' (and anything 
after it) and rstrip spaces
+    updated_line = re.sub(r"#\s*use next version.*$", "", 
updated_line).rstrip()

Review Comment:
   I had two cases where comma was added after the comment - it seems it is 
eeasy to do it when adding `# use next version`



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