Skip to content

Commit

Permalink
Fix some more minor linter complaints
Browse files Browse the repository at this point in the history
  • Loading branch information
Dobiasd committed Nov 5, 2019
1 parent 1ebcc1a commit 6f0e509
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions undictify/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1247,8 +1247,8 @@ def setUp(self) -> None:
@dataclasses.dataclass
class MyClass: # pylint: disable=too-few-public-methods
"""With an InitVar"""
x: int
y: int
x: int # pylint: disable=invalid-name
y: int # pylint: disable=invalid-name
my_initvar: dataclasses.InitVar[str]
extra_field: str = dataclasses.field(init=False)

Expand Down Expand Up @@ -1280,8 +1280,8 @@ def test_unpacks_lists_and_dicts_with_initvars(self) -> None:
@dataclasses.dataclass
class Friend: # pylint: disable=too-few-public-methods
"""Only plain members"""
a: int
b: int
a: int # pylint: disable=invalid-name
b: int # pylint: disable=invalid-name

@type_checked_constructor()
@dataclasses.dataclass
Expand All @@ -1299,8 +1299,8 @@ def __post_init__(self, i: List[Friend]) -> None:
@dataclasses.dataclass
class Outer: # pylint: disable=too-few-public-methods
"""With a list of objects with InitVars"""
b: int
a: List[Hello]
b: int # pylint: disable=invalid-name
a: List[Hello] # pylint: disable=invalid-name

input_dict = {
"b": 12,
Expand Down Expand Up @@ -1338,7 +1338,7 @@ def test_known_bug_initvar_as_argument_passes(self) -> None:
argument)"""

@type_checked_call()
def hello(x: dataclasses.InitVar[Any], y: dataclasses.InitVar[Any],
def hello(x: dataclasses.InitVar[Any], y: dataclasses.InitVar[Any], # pylint: disable=invalid-name
z: int) -> str: # pylint: disable=invalid-name
return f"{x} and {y} and {z}"

Expand Down

0 comments on commit 6f0e509

Please sign in to comment.