Add more missing type hints to tests. (#15028)

This commit is contained in:
Patrick Cloke 2023-02-08 16:29:49 -05:00 committed by GitHub
parent 4eed7b2ede
commit 30509a1010
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 124 additions and 111 deletions

View file

@ -13,13 +13,13 @@
# limitations under the License.
from html.parser import HTMLParser
from typing import Dict, Iterable, List, Optional, Tuple
from typing import Dict, Iterable, List, NoReturn, Optional, Tuple
class TestHtmlParser(HTMLParser):
"""A generic HTML page parser which extracts useful things from the HTML"""
def __init__(self):
def __init__(self) -> None:
super().__init__()
# a list of links found in the doc
@ -48,5 +48,5 @@ class TestHtmlParser(HTMLParser):
assert input_name
self.hiddens[input_name] = attr_dict["value"]
def error(_, message):
def error(self, message: str) -> NoReturn:
raise AssertionError(message)