Skip to content

Pylint unable to suppress duplicate-code warning across files #190

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
pylint-bot opened this issue Sep 22, 2015 · 4 comments
Closed

Pylint unable to suppress duplicate-code warning across files #190

pylint-bot opened this issue Sep 22, 2015 · 4 comments
Labels

Comments

@pylint-bot
Copy link

Originally reported by: Rohit Bhattacharjee (BitBucket: rohitativy, GitHub: @rohitativy?)


Hi,

I have same code in two files in a project, and this is by design, since these are test cases. On running pylint on my project I am being thrown a duplicate-code warning by pylint even though I have disabled the pylint check for duplicate-code in both of my files locally # pylint: disable=duplicate-code .
I can suppress this warning globally by running pylint <foldername> --disable=duplicate-code which I don't want because I really don't want duplicate-code to exist in the project; they can only exist if the user has any specific requirements.

regards
Rohit


@pylint-bot
Copy link
Author

Original comment by Florian Bruhin (BitBucket: The-Compiler, GitHub: @The-Compiler?):


This has nothing to do with astroid and is a duplicate of #214 in pylint to which Claudiu and I already linked you to via IRC and mailinglist...

@pylint-bot
Copy link
Author

Original comment by Claudiu Popa (BitBucket: PCManticore, GitHub: @PCManticore):


Thanks, Florian.

@bittner
Copy link

bittner commented Oct 13, 2016

Interestingly, I do have the same issue today. I have two test classes (in two files) that are almost identical in one place, but this is by design; as usual this with tests, I suppose. How can I disable the duplicate-code warning locally?

The issue linked to Bitbucket above is not accessible anymore. -- Please advise.

@moylop260
Copy link
Contributor

This issue is a pylint one.
Duplicated with: pylint-dev/pylint#214

FYI I'm waiting testers to receive feedback of the following fix: pylint-dev/pylint#1055

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants