You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Import an already imported package under a condition in the code.
Disable the expected warning about ungrouped-imports
Gets the message about useless-suppression.
Current behavior
Hi,
I am using a specific property for type checking here where the code is like this:
if typing.TYPE_CHECKING:
from package import module
When running pylint, I get expected warning about Imports from the package are not grouped (ungrouped-imports) as I am importing the same package for other modules in the top section of the file.
But when I add pylint: disable=ungrouped-imports, I get a message about Useless suppression of 'ungrouped-imports' (useless-suppression).
Expected behavior
I should not get the message about useless-suppression as I am suppressing the warning about ungrouped-imports. That is my assumption or am I doing something wrong here?
Thanks in advance.
pylint --version output
pylint 1.8.4,
Python 3.6.5
The text was updated successfully, but these errors were encountered:
Steps to Reproduce
Current behavior
Hi,
I am using a specific property for type checking here where the code is like this:
When running pylint, I get expected warning about
Imports from the package are not grouped (ungrouped-imports)
as I am importing the same package for other modules in the top section of the file.But when I add
pylint: disable=ungrouped-imports
, I get a message about Useless suppression of 'ungrouped-imports' (useless-suppression).Expected behavior
I should not get the message about useless-suppression as I am suppressing the warning about ungrouped-imports. That is my assumption or am I doing something wrong here?
Thanks in advance.
pylint --version output
The text was updated successfully, but these errors were encountered: