Skip to content

futurize **/*.py does not work on deeply nested repositories with bash or zsh #175

Closed
@mpacer

Description

@mpacer

I'm trying to use futurize https://github.com/suchow/Dissertate from the root directory of the repo and it returns

$ futurize --stage1 **/*.py
RefactoringTool: Skipping implicit fixer: idioms
RefactoringTool: Skipping implicit fixer: ws_comma
RefactoringTool: No files need to be modified.

I know there are bad print (python2 only) statements within assets/schools/Generic/generic.py (specifically print "" in https://github.com/suchow/Dissertate/blob/master/assets/schools/Generic/generic.py#L11 ). I could fix it manually, but I was actually using this as a test to make sure that futurize could reach arbitrarily deep into the file structure that is mostly not python files, but does have python files eventually.

I'm using bash as my shell, and I tried zsh $(futurize --stage1 **/*.py) as well, and both return that no files need to be modified.

If I cd assets/schools/ then it works:

futurize --stage1 **/*.py
RefactoringTool: Skipping implicit fixer: idioms
RefactoringTool: Skipping implicit fixer: ws_comma
RefactoringTool: Refactored Generic/generic.py
--- Generic/generic.py  (original)
+++ Generic/generic.py  (refactored)
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+from __future__ import print_function
 from docx import Document


@@ -8,7 +9,7 @@
         self.document = Document('../assets/word-base/dissertate.docx')

     def fill(self):
-        print ""
+        print("")

     def save(self):
         self.document.save('dissertation.docx')
RefactoringTool: Files that need to be modified:
RefactoringTool: Generic/generic.py

So it must be something having to do with the recursive search.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions