eantyshev commented on code in PR #23088:
URL: https://github.com/apache/beam/pull/23088#discussion_r990396674
##########
playground/infrastructure/helper.py:
##########
@@ -112,24 +113,27 @@ def find_examples(work_dir: str, supported_categories:
List[str],
"""
has_error = False
examples = []
- for root, _, files in os.walk(work_dir):
- for filename in files:
- filepath = os.path.join(root, filename)
- error_during_check_file = _check_file(
- examples=examples,
- filename=filename,
- filepath=filepath,
- supported_categories=supported_categories,
- sdk=sdk)
- has_error = has_error or error_during_check_file
+ for subdir in subdirs:
Review Comment:
@damccorm
After 5 minutes I realized that it's not trivial to make this check
Naive version I've reverted blocks valid cases like: `["sub", "subsub"]`
Of course, we could split it with `os.path.split` but it won't normalize
paths like `sub1/../sub2`
More elaborated version could use `os.path.normpath` helper to normalize
paths, but still won't recognize cases like
`[".", "sub"]`
I feel like that the profit won't justify the effort here
--
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]