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

--recursive does not work for stub files #682

Open
Avasam opened this issue Apr 17, 2023 · 1 comment
Open

--recursive does not work for stub files #682

Avasam opened this issue Apr 17, 2023 · 1 comment
Assignees

Comments

@Avasam
Copy link

Avasam commented Apr 17, 2023

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
@asdawej
Copy link

asdawej commented Dec 11, 2023

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.

@hhatto hhatto self-assigned this Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants