shahar1 commented on code in PR #42902:
URL: https://github.com/apache/airflow/pull/42902#discussion_r1796483489


##########
airflow/utils/file.py:
##########
@@ -355,6 +355,6 @@ def get_unique_dag_module_name(file_path: str) -> str:
     """Return a unique module name in the format unusual_prefix_{sha1 of 
module's file path}_{original module name}."""
     if isinstance(file_path, str):
         path_hash = hashlib.sha1(file_path.encode("utf-8")).hexdigest()
-        org_mod_name = Path(file_path).stem
+        org_mod_name = re2.sub(r"[.-]", "_", Path(file_path).stem)

Review Comment:
   Could you please add a test?



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