Skip to content
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

handle py2/py3 print statement vs function better (via user configurable option) #123

Merged
merged 4 commits into from
Mar 21, 2020

Conversation

anentropic
Copy link
Contributor

fixes #119

this allows Bowler to refactor py2 files containing print statements

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Mar 19, 2020
bowler/tool.py Show resolved Hide resolved
```

* `*paths` - Accepts either individual file or directory paths (relative to the current
working directory), or lists of paths, for any positional argument given.
Defaults to the current working directory if no arguments given.

* `*filename_matcher*` - A callback which returns whether a given filename is
* `python_version` - The 'major' python version of the files to be refactored, i.e. `2`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add asterisks back on the param names please?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, I thought maybe they were intended as bold formatting but they display as literal asterisks (and it's not an *args param)

will put them back

also I will reorder docs and code to put my new arg after the existing one, that would be safer

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done in ff8c0d4

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@thatch thatch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I appreciate the thorough tests! Two minor comments.

@thatch thatch requested a review from amyreese March 20, 2020 23:43
@amyreese amyreese merged commit e5f11dc into facebookincubator:master Mar 21, 2020
@amyreese
Copy link
Contributor

Thank you!

@anentropic
Copy link
Contributor Author

Thanks so much for merging!

Do you have an idea when the next PyPI release will be?

@thatch
Copy link
Contributor

thatch commented Mar 21, 2020

I hope soon, but we ought to do some manual testing on windows first -- this release ought to work there (in single process mode) and I'd like to mention that in the release notes if so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactoring Python 2.7 files does not work (parse error on print statement)
4 participants