We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
https://github.com/PyCQA/pylint/blob/d668f641ef5d5794f912cd5a23292bf493290905/pylint/utils/ast_walker.py#L98 prints the exception error message to stdout, making the output invalid.
No response
$ cat myfile.py def myfunc(): try: @property def myfunc(): return None except TypeError: pass @myfunc.setter def myfunc(): pass return myfunc() $ pylint --output-format=json myfile.py 2>/dev/null
Exception on node <Call l.13 at 0x7ff8da87f3a0> in file 'myfile.py' [ { "type": "warning", "module": "myfile", "obj": "", "line": 2, "column": 0, "endLine": null, "endColumn": null, "path": "myfile.py", "symbol": "bad-indentation", "message": "Bad indentation. Found 2 spaces, expected 4", "message-id": "W0311" }, { "type": "warning", "module": "myfile", "obj": "", "line": 3, "column": 0, "endLine": null, "endColumn": null, "path": "myfile.py", "symbol": "bad-indentation", "message": "Bad indentation. Found 4 spaces, expected 8", "message-id": "W0311" }, { "type": "warning", "module": "myfile", "obj": "", "line": 4, "column": 0, "endLine": null, "endColumn": null, "path": "myfile.py", "symbol": "bad-indentation", "message": "Bad indentation. Found 4 spaces, expected 8", "message-id": "W0311" }, { "type": "warning", "module": "myfile", "obj": "", "line": 5, "column": 0, "endLine": null, "endColumn": null, "path": "myfile.py", "symbol": "bad-indentation", "message": "Bad indentation. Found 6 spaces, expected 12", "message-id": "W0311" }, { "type": "warning", "module": "myfile", "obj": "", "line": 6, "column": 0, "endLine": null, "endColumn": null, "path": "myfile.py", "symbol": "bad-indentation", "message": "Bad indentation. Found 2 spaces, expected 4", "message-id": "W0311" }, { "type": "warning", "module": "myfile", "obj": "", "line": 7, "column": 0, "endLine": null, "endColumn": null, "path": "myfile.py", "symbol": "bad-indentation", "message": "Bad indentation. Found 4 spaces, expected 8", "message-id": "W0311" }, { "type": "warning", "module": "myfile", "obj": "", "line": 9, "column": 0, "endLine": null, "endColumn": null, "path": "myfile.py", "symbol": "bad-indentation", "message": "Bad indentation. Found 2 spaces, expected 4", "message-id": "W0311" }, { "type": "warning", "module": "myfile", "obj": "", "line": 10, "column": 0, "endLine": null, "endColumn": null, "path": "myfile.py", "symbol": "bad-indentation", "message": "Bad indentation. Found 2 spaces, expected 4", "message-id": "W0311" }, { "type": "warning", "module": "myfile", "obj": "", "line": 11, "column": 0, "endLine": null, "endColumn": null, "path": "myfile.py", "symbol": "bad-indentation", "message": "Bad indentation. Found 4 spaces, expected 8", "message-id": "W0311" }, { "type": "warning", "module": "myfile", "obj": "", "line": 13, "column": 0, "endLine": null, "endColumn": null, "path": "myfile.py", "symbol": "bad-indentation", "message": "Bad indentation. Found 2 spaces, expected 4", "message-id": "W0311" }, { "type": "convention", "module": "myfile", "obj": "", "line": 1, "column": 0, "endLine": null, "endColumn": null, "path": "myfile.py", "symbol": "missing-module-docstring", "message": "Missing module docstring", "message-id": "C0114" }, { "type": "convention", "module": "myfile", "obj": "myfunc", "line": 1, "column": 0, "endLine": 1, "endColumn": 10, "path": "myfile.py", "symbol": "missing-function-docstring", "message": "Missing function or method docstring", "message-id": "C0116" }, { "type": "warning", "module": "myfile", "obj": "myfunc.myfunc", "line": 4, "column": 4, "endLine": 4, "endColumn": 14, "path": "myfile.py", "symbol": "redefined-outer-name", "message": "Redefining name 'myfunc' from outer scope (line 1)", "message-id": "W0621" }, { "type": "fatal", "module": "myfile", "obj": "", "line": 1, "column": 0, "endLine": null, "endColumn": null, "path": "myfile.py", "symbol": "astroid-error", "message": "myfile.py: Fatal error while checking 'myfile.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '~/.cache/pylint/pylint-crash-2022-05-12-14.txt'.", "message-id": "F0002" } ]
### Expected behavior pylint should write valid json to stdout ### Pylint version ```shell pylint 2.13.8 astroid 2.11.4 Python 3.9.10 (main, Mar 16 2022, 06:54:08) [GCC 11.2.0]
The text was updated successfully, but these errors were encountered:
I have an upcoming PR to address this.
Sorry, something went wrong.
ASTWalker.walk
Successfully merging a pull request may close this issue.
Bug description
https://github.com/PyCQA/pylint/blob/d668f641ef5d5794f912cd5a23292bf493290905/pylint/utils/ast_walker.py#L98 prints the exception error message to stdout, making the output invalid.
Configuration
No response
Command used
Pylint output
OS / Environment
No response
Additional dependencies
No response
The text was updated successfully, but these errors were encountered: