-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
bpo-35282: Add a return value to lib2to3.refactor_file and refactor_dir #10618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-35282: Add a return value to lib2to3.refactor_file and refactor_dir #10618
Conversation
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA). Our records indicate we have not received your CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. If you have recently signed the CLA, please wait at least one business day You can check yourself to see if the CLA has been received. Thanks again for your contribution, we look forward to reviewing it! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a reasonable change to me, though the refactor_file
docstring could do with an update.
Is this really enough? You don't want to distinguish changed files from unreadable ones? |
@benjaminp do you mean |
Maybe. I suppose I want to understand the usecase for this. Starting to provide a list return value prevents us from extending the returned information in the future. |
sorry, missed ths comment. my use case was to run |
Closed under bpo-45544. |
lib2to3.refactor.refactor_file returns None (file read failed), True (file was written to) or False (file was not written to)
lib2to3.refactor.refactor_dir returns a list of changed files
https://bugs.python.org/issue35282