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


##########
dev/example_dags/update_example_dags_paths.py:
##########
@@ -102,19 +102,18 @@ def find_matches(_file: Path, provider: str, version: 
str):
 
 if __name__ == "__main__":
     curdir: Path = Path(os.curdir).resolve()
-    dirs: list[Path] = list(filter(os.path.isdir, curdir.iterdir()))
+    dirs: list[Path] = [p for p in curdir.iterdir() if p.is_dir()]
     with Progress(console=console) as progress:
         task = progress.add_task(f"Updating {len(dirs)}", total=len(dirs))
         for directory in dirs:
             if directory.name.startswith("apache-airflow-providers-"):
                 provider = directory.name[len("apache-airflow-providers-") :]
                 console.print(f"[bright_blue] Processing {directory}")
-                version_dirs = list(filter(os.path.isdir, directory.iterdir()))
+                version_dirs = [p for p in directory.iterdir() if p.is_dir()]
                 for version_dir in version_dirs:

Review Comment:
   ```python
   for version_dir in directory.iterdir():
       if not version_dir.is_dir():
           continue
       ...
   ```



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