forked from pylint-dev/pylint
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding `# pylint: disable-next=msgid` to your file will disable the message for the next line. This closes pylint-dev#1682
- Loading branch information
1 parent
a71cfe1
commit f58f428
Showing
8 changed files
with
70 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
"""Test if disable-next only disables messages for the next line""" | ||
# pylint: disable=missing-function-docstring | ||
# pylint: disable-next=unused-argument, invalid-name | ||
def function_A(arg1, arg2): | ||
return arg1 | ||
|
||
|
||
# pylint: disable-next=unused-argument,invalid-name | ||
def function_B(arg1, arg2): | ||
return arg1 | ||
|
||
|
||
# pylint: disable-next=invalid-name, f-string-without-interpolation | ||
def function_C(): | ||
x = "string" # [unused-variable, invalid-name] | ||
return f"This should be a normal string" # [f-string-without-interpolation] | ||
|
||
|
||
def function_D(arg1, arg2): # [unused-argument, invalid-name] | ||
return arg1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
invalid-name:15:4:function_C:"Variable name ""x"" doesn't conform to snake_case naming style":HIGH | ||
unused-variable:15:4:function_C:"Unused variable 'x'":HIGH | ||
f-string-without-interpolation:16:11:function_C:"Using an f-string that does not have any interpolated variables":HIGH | ||
invalid-name:19:0:function_D:"Function name ""function_D"" doesn't conform to snake_case naming style":HIGH | ||
unused-argument:19:21:function_D:"Unused argument 'arg2'":HIGH |