Skip to content

Commit

Permalink
fixup! Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
blueyed committed Jun 1, 2019
1 parent 0bbf951 commit 87b163e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions mypy/test/testpep561.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ class NSImportStyle(Enum):

class SimpleMsg(Enum):
msg_dne = "{tempfile}:3: error: Module 'typedpkg' has no attribute 'dne'"
msg_list = "{tempfile}:5: error: Revealed type is 'builtins.list[builtins.str]'"
msg_tuple = "{tempfile}:5: error: Revealed type is 'builtins.tuple[builtins.str]'"
msg_list = "{tempfile}:5: note: Revealed type is 'builtins.list[builtins.str]'"
msg_tuple = "{tempfile}:5: note: Revealed type is 'builtins.tuple[builtins.str]'"


class NamespaceMsg(Enum):
Expand Down
2 changes: 1 addition & 1 deletion scripts/find_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def run_mypy(mypy_and_args: List[str], filename: str, tmp_name: str) -> str:
return proc.stdout.decode(encoding="utf-8")

def get_revealed_type(line: str, relevant_file: str, relevant_line: int) -> Optional[str]:
m = re.match(r"(.+?):(\d+): error: Revealed type is '(.*)'$", line)
m = re.match(r"(.+?):(\d+): note: Revealed type is '(.*)'$", line)
if (m and
int(m.group(2)) == relevant_line and
os.path.samefile(relevant_file, m.group(1))):
Expand Down

0 comments on commit 87b163e

Please sign in to comment.