File tree 1 file changed +10
-0
lines changed
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 8
8
import sys
9
9
import re
10
10
from subprocess import Popen , PIPE
11
+ import os
11
12
12
13
from pylint .epylint import py_run
13
14
from pylsp import hookimpl , lsp
19
20
20
21
log = logging .getLogger (__name__ )
21
22
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
+
22
32
23
33
class PylintLinter :
24
34
last_diags = collections .defaultdict (list )
You can’t perform that action at this time.
0 commit comments