Skip to content

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

Open
@Pierre-Sassoulas

Description

@Pierre-Sassoulas

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Documentation 📗Needs PRThis issue is accepted, sufficiently specified and now needs an implementation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions