autopep8 icon indicating copy to clipboard operation
autopep8 copied to clipboard

`--recursive` does not work for stub files

Open Avasam opened this issue 3 years ago • 1 comments

Python Code

N/A

Command Line

autopep8 ./types --in-place --recursive ☝Does not run on ./types/**/*.pyi files

Your Environment

  • Python version: 3.9.13
  • autopep8 version: 2.0.2
  • Platform: Windows 10

Avasam avatar Apr 17 '23 00:04 Avasam

Notice the function is_python_file in autopep8.py; it's using the file suffix '.py' & shebang line to recognize a python file. So an expediency is to add a shebang line for your .pyi stub files.

But, a better answer is to modify the function and take .pyi suffix into account, I think.

asdawej avatar Dec 11 '23 14:12 asdawej