pylint
                                
                                
                                
                                    pylint copied to clipboard
                            
                            
                            
                        Inline disable comments conflicts with ``--disable=W`` CLI argument
Steps to reproduce
script:
import os
# pylint: disable=unused-import
from sys import exit
print("Hi")
If you run plain pylint on this, you get "W0611: Unused import os (unused-import)" as expected.
But if you run pylint --disable=W, you still get the same warning, even though I expected all warnings to be disabled.
Note that if the pylint comment is placed on the same line as the last import:
import os
from sys import exit  # pylint: disable=unused-import
print("Hi")
then pylint --disable=W returns 10/10 as expected.
pylint --version output
% pylint --version                
pylint 2.6.0
astroid 2.4.2
Python 3.6.5
                                    
                                    
                                    
                                
@Redoubts thanks for the report. It seems to be a bug.