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

Some messages written to stdout instead of stderr #717

Open
herring-swe opened this issue Nov 28, 2023 · 0 comments
Open

Some messages written to stdout instead of stderr #717

herring-swe opened this issue Nov 28, 2023 · 0 comments
Assignees

Comments

@herring-swe
Copy link

herring-swe commented Nov 28, 2023

autopep8 outputs some warnings and verbose messages to stdout instead of stderr.
This leads to problems when someone (such as vscode extension vscode-autopep8) wants to format not using --in-place flag since there's no distinction between output code and processing messages and thus writes the message into the new code..
See: microsoft/vscode-autopep8#201


Command Line and Configuration

~/.config/pycodestyle

[pycodestyle]
max-complexity = 20

Command Line

$ python -m autopep8 -i file.py -vvv 2>/dev/null
read config path: /home/xyz/.config/pycodestyle
  unknown option 'max-complexity' ignored
$ python -m autopep8 -i file.py -vvv 1>/dev/null
[file:file.py]
--->  10 issue(s) to fix {'E221': {13, 14, 15, 16, 17, 18, 19}, 'E501': {72, 122, 100}}
--->  Not fixing E501 on line 72
--->  Not fixing E501 on line 100
--->  Not fixing E501 on line 122

Your Environment

  • Python version: 2.0.4
  • autopep8 version: 2.11.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants