Skip to content

Commit

Permalink
mypy: test_link_embed.py: add assert & remove from mypy.ini.
Browse files Browse the repository at this point in the history
  • Loading branch information
neiljp authored and timabbott committed Jun 19, 2018
1 parent d1ba6ba commit b5aa705
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 0 additions & 2 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,6 @@ strict_optional = False
strict_optional = False
[mypy-zerver/tests/test_logging_handlers] #73: error: Argument 7 to "makeRecord" of "Logger" has incompatible type "Tuple[Optional[Type[BaseException]], Optional[BaseException], Optional[TracebackType]]"; expected "Union[Tuple[type, BaseException, TracebackType], Tuple[None, None, None], None]"
strict_optional = False
[mypy-zerver/tests/test_link_embed] #53: error: Value of type "Optional[Dict[Any, Any]]" is not indexable
strict_optional = False
[mypy-zerver/tests/test_embedded_bot_system] #26: error: Item "None" of "Optional[UserProfile]" has no attribute "email"
strict_optional = False
[mypy-zerver/tests/test_decorators] #1322: error: Item "None" of "Optional[Match[str]]" has no attribute "groupdict"
Expand Down
1 change: 1 addition & 0 deletions zerver/tests/test_link_embed.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def test_present_provider(self, get: Any) -> None:
data = get_oembed_data(url)
self.assertIsInstance(data, dict)
self.assertIn('title', data)
assert data is not None # allow mypy to infer data is indexable
self.assertEqual(data['title'], response_data['title'])

@mock.patch('pyoembed.requests.get')
Expand Down

0 comments on commit b5aa705

Please sign in to comment.