You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "uranusjr (via GitHub)" <gi...@apache.org> on 2023/09/15 05:56:04 UTC
[GitHub] [airflow] uranusjr commented on a diff in pull request #34352: Refactor os.path.splitext to Path.*
uranusjr commented on code in PR #34352:
URL: https://github.com/apache/airflow/pull/34352#discussion_r1326825400
##########
airflow/dag_processing/manager.py:
##########
@@ -1042,8 +1040,7 @@ def _collect_results_from_processor(self, processor) -> None:
run_count=self.get_run_count(processor.file_path) + 1,
)
self._file_stats[processor.file_path] = stat
-
- file_name = os.path.splitext(os.path.basename(processor.file_path))[0].replace(os.sep, ".")
Review Comment:
The final `replace` call is so weird… Since `basename` is called, the value just can never contain an `os.sep` in the first place.
##########
airflow/dag_processing/manager.py:
##########
@@ -1042,8 +1040,7 @@ def _collect_results_from_processor(self, processor) -> None:
run_count=self.get_run_count(processor.file_path) + 1,
)
self._file_stats[processor.file_path] = stat
-
- file_name = os.path.splitext(os.path.basename(processor.file_path))[0].replace(os.sep, ".")
Review Comment:
The final `replace` call is so weird… Since `basename` is called, the value just can never contain an `os.sep` in the first place.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org