File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88import sys
99import re
1010from subprocess import Popen , PIPE
11+ import os
1112
1213from pylint .epylint import py_run
1314from pylsp import hookimpl , lsp
1920
2021log = logging .getLogger (__name__ )
2122
23+ # Pylint fails to suppress STDOUT when importing whitelisted C
24+ # extensions, mangling their output into the expected JSON which breaks the
25+ # parser. The most prominent example (and maybe the only one out there) is
26+ # pygame - we work around that by asking pygame to NOT display the message upon
27+ # import via an (otherwise harmless) environment variable. This is an ad-hoc
28+ # fix for a very specific upstream issue.
29+ # Related: https://github.com/PyCQA/pylint/issues/3518
30+ os .environ ['PYGAME_HIDE_SUPPORT_PROMPT' ] = 'hide'
31+
2232
2333class PylintLinter :
2434 last_diags = collections .defaultdict (list )
You can’t perform that action at this time.
0 commit comments