bpo-35282: Add a return value to lib2to3.refactor_file and refactor_dir#10618
bpo-35282: Add a return value to lib2to3.refactor_file and refactor_dir#10618martindemello wants to merge 6 commits intopython:mainfrom martindemello:lib2to3-refactor-return-value
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! |
zware
left a comment
There was a problem hiding this comment.
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