Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cdce8p committed Jul 28, 2021
1 parent 79f6b7e commit b4cd3fd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions tests/functional/n/no/no_member_if_statements.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# pylint: disable=invalid-name,missing-docstring,pointless-statement
from datetime import datetime
from typing import Union

value = "Hello World"
value.isoformat() # [no-member]
Expand All @@ -26,10 +27,10 @@ def func():


class Base:
_attr_state: str | float | datetime = "Unknown"
_attr_state: Union[str, datetime] = "Unknown"

@property
def state(self) -> str | float | datetime:
def state(self) -> Union[str, datetime]:
return self._attr_state

def some_function(self) -> str:
Expand Down
6 changes: 3 additions & 3 deletions tests/functional/n/no/no_member_if_statements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
no-member:5:0::Instance of 'str' has no 'isoformat' member:INFERENCE
no-member:11:4::Instance of 'str' has no 'isoformat' member:INFERENCE
no-member:22:3::Instance of 'str' has no 'none_existent' member:INFERENCE
no-member:6:0::Instance of 'str' has no 'isoformat' member:INFERENCE
no-member:12:4::Instance of 'str' has no 'isoformat' member:INFERENCE
no-member:23:3::Instance of 'str' has no 'none_existent' member:INFERENCE

0 comments on commit b4cd3fd

Please sign in to comment.