Skip to content

Conversation

zleman1593
Copy link
Contributor

@zleman1593 zleman1593 commented Nov 11, 2024

If you run torchfix script on a directory without Python files, it will terminate with an error. This modifies the script to just do nothing in such cases, without terminating with an error.

Testing:

Added test "test_no_python_files"

Without fix the new test fails:

assert 1 == 0
...... raise Exception("Must have at least one job to process!")\nException: Must have at least one job to process!\n').returncode ......

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 11, 2024
@zleman1593 zleman1593 changed the title Return without an error when there are no valid python files in the directory. Handle no valid python files in the directory. Nov 11, 2024
@zleman1593 zleman1593 marked this pull request as ready for review November 11, 2024 20:43
@zleman1593 zleman1593 changed the title Handle no valid python files in the directory. Fix: Handle no valid python files in the directory. Nov 11, 2024
@kit1980 kit1980 merged commit 6bfffd9 into main Nov 12, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants