You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "potiuk (via GitHub)" <gi...@apache.org> on 2023/08/24 10:21:00 UTC

[GitHub] [airflow] potiuk commented on a diff in pull request #33669: Refactor: path.rglob("…") does not need "**"

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


##########
tests/system/providers/google/cloud/gcs/resources/transform_timespan.py:
##########
@@ -28,11 +28,11 @@
 print(f"Running script, called with source: {source}, destination: {destination}")
 print(f"timespan_start: {timespan_start}, timespan_end: {timespan_end}")
 
-with open(Path(destination) / "output.txt", "w+") as dest:
-    for f in Path(source).glob("**/*"):
+with Path(destination, "output.txt").open("w+") as dest:
+    for f in Path(source).rglob("*"):
         if f.is_dir():
             continue
-    with open(f) as src:
-        lines = [line.upper() for line in src.readlines()]
-        print(lines)
-        dest.writelines(lines)
+        with f.open() as src:

Review Comment:
   Yes. Google System tests are not **yet** run regularly. Google team works on automatically running them and providing a dashboard so they would get to this one too.. but we can correct it now.



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