Skip to content

Commit ad2727f

Browse files
committed
Test invalid_name still emitted for other arguments
1 parent 72a0f2e commit ad2727f

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

tests/functional/i/invalid/invalid_name.py

+10
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ def a_very_very_very_long_function_name_WithCamelCase_to_make_it_sad(): # Shoul
7474
class FooBar:
7575
def __init__(self, fooBar) -> None: # [invalid-name]
7676
self.foo_bar = fooBar
77+
self.foo_bar2 = None
7778

7879
def func1(
7980
self,
@@ -93,3 +94,12 @@ def test_disable2(
9394

9495
def test_disable3(self, fooBar): # pylint: disable=invalid-name
9596
self.foo_bar = fooBar
97+
98+
def test_disable_mixed(
99+
self,
100+
fooBar, # pylint: disable=invalid-name
101+
fooBar2, # [invalid-name]
102+
):
103+
"""Invalid-name will still be raised for other arguments."""
104+
self.foo_bar = fooBar
105+
self.foo_bar2 = fooBar2

tests/functional/i/invalid/invalid_name.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ invalid-name:32:0:a:"Function name ""a"" doesn't conform to snake_case naming st
44
invalid-name:46:4::"Constant name ""Foocapfor"" doesn't conform to UPPER_CASE naming style":HIGH
55
invalid-name:63:0:a_very_very_very_long_function_name_WithCamelCase_to_make_it_sad:"Function name ""a_very_very_very_long_function_name_WithCamelCase_to_make_it_sad"" doesn't conform to snake_case naming style":HIGH
66
invalid-name:75:23:FooBar.__init__:"Argument name ""fooBar"" doesn't conform to snake_case naming style":HIGH
7-
invalid-name:80:8:FooBar.func1:"Argument name ""fooBar"" doesn't conform to snake_case naming style":HIGH
7+
invalid-name:81:8:FooBar.func1:"Argument name ""fooBar"" doesn't conform to snake_case naming style":HIGH
8+
invalid-name:101:8:FooBar.test_disable_mixed:"Argument name ""fooBar2"" doesn't conform to snake_case naming style":HIGH

0 commit comments

Comments
 (0)