From 2ddb9dbb11f5173bb27e538631d0e888caace6b0 Mon Sep 17 00:00:00 2001 From: Federico Ressi Date: Wed, 16 Jun 2021 10:10:33 +0200 Subject: [PATCH] Add type hints to fail function Change-Id: I77398dcd9fb3bb380c61aa8bd1fddd9680e4e8ca --- tobiko/common/_asserts.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tobiko/common/_asserts.py b/tobiko/common/_asserts.py index fa3b6045e..9d52e0ebc 100644 --- a/tobiko/common/_asserts.py +++ b/tobiko/common/_asserts.py @@ -13,13 +13,15 @@ # under the License. from __future__ import absolute_import +import typing + import testtools FailureException = testtools.TestCase.failureException -def fail(msg, *args, **kwargs): +def fail(msg: str, *args, **kwargs) -> typing.NoReturn: """Fail immediately current test case execution, with the given message. Unconditionally raises a tobiko.FailureException as in below equivalent