Skip to content

Unneeded Useless Supression #2043

New issue

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

Closed
sugatmahanti opened this issue Apr 25, 2018 · 2 comments
Closed

Unneeded Useless Supression #2043

sugatmahanti opened this issue Apr 25, 2018 · 2 comments
Labels
Needs reproduction 🔍 Need a way to reproduce it locally on a maintainer's machine

Comments

@sugatmahanti
Copy link

Steps to Reproduce

  1. Import an already imported package under a condition in the code.
  2. Disable the expected warning about ungrouped-imports
  3. 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

@PCManticore
Copy link
Contributor

Hi @sugatmahanti Do you have a small snippet of code that could reproduce this issue?

@PCManticore PCManticore added the Needs reproduction 🔍 Need a way to reproduce it locally on a maintainer's machine label May 7, 2018
@PCManticore
Copy link
Contributor

Closing as I cannot reproduce this issue. Please reopen if you still experience this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs reproduction 🔍 Need a way to reproduce it locally on a maintainer's machine
Projects
None yet
Development

No branches or pull requests

2 participants