Fix lint traceback for .cylc directories - #7351
Open
binggao1230 wants to merge 3 commits into
Open
Conversation
Member
|
Hi @gaoflow 👋, thanks for your interest in Cylc. |
| modify: bool = False, | ||
| ): | ||
| """Check A Cylc File for Cylc 7 Config""" | ||
| if not file.is_file(): |
Member
There was a problem hiding this comment.
It might be safer to use if file.is_dir here as these files are sometimes symlinks.
Author
|
Thanks, good point. I changed the guard to only special-case directories with Local verification:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #7344.
This prevents
cylc lintfrom raising tracebacks for the issue reproduction where an emptyflow.cylcexists alongside a directory named*.cylc.Changes:
.cylcdirectories.CONTRIBUTING.md.Verification:
.venv/bin/python -m pytest tests/unit/scripts/test_lint.py.venv/bin/python -m flake8 cylc/flow/scripts/lint.py tests/unit/scripts/test_lint.pygit diff --checktouch flow.cylc,mkdir another.cylc, andcylc lint --exit-zero