Skip to content
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

[duplicate-code] unclear how to disable the message for select occurrences, while keeping the option enabled in general #9408

Open
Pierre-Sassoulas opened this issue Feb 1, 2024 · 0 comments
Labels
Documentation 📗 Needs PR This issue is accepted, sufficiently specified and now needs an implementation

Comments

@Pierre-Sassoulas
Copy link
Member

Pierre-Sassoulas commented Feb 1, 2024

I’m a little unclear on how to disable the message for select occurrences, while keeping the option enabled in general. The docs don’t mention that detail either.

For example, suppose I have

************* Module foo.bar
path/to/foo/bar.py:1:0: R0801: Similar lines in 2 files
==foo.other.nip:[32:89]
==foo.bar:[37:97]

    a = b
    b = more()
    some_other_code()  (duplicate-code)

Adding a # pylint: disable=duplicate-code to lines 32 and 37 in both files, respectively, doesn’t work. How can I then silence the warning?

Originally posted by @jenstroeger in #214 (comment)

@Pierre-Sassoulas Pierre-Sassoulas added Documentation 📗 Needs PR This issue is accepted, sufficiently specified and now needs an implementation labels Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation 📗 Needs PR This issue is accepted, sufficiently specified and now needs an implementation
Projects
None yet
Development

No branches or pull requests

1 participant