You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ echo'from numpy import repeat\nrepeat(2, 3)'| 2to3 -
RefactoringTool: Skipping optional fixer: buffer
RefactoringTool: Skipping optional fixer: idioms
RefactoringTool: Skipping optional fixer: set_literal
RefactoringTool: Skipping optional fixer: ws_comma
RefactoringTool: No files need to be modified.
RefactoringTool: Warnings/messages while refactoring:
RefactoringTool: ### In file <stdin> ###
RefactoringTool: Line 2: You should use 'operator.mul(2, 3)' here.
numpy.repeat(2, 3) returns np.array([2, 2, 2]) but 2to3 confuses it with the old operator.repeat. It may be impossible to resolve in general which function the author wanted to call but perhaps the warning should only be raised if the operator module is imported at some point? (or clarify the error message)
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: