Problems when I try to commit
Daniel Garcia
demonpogp at gmail.com
Tue Mar 10 11:45:04 CET 2020
I have a problem when i try to do a commit
this is the message:
--------------------------------------------------------------------
mypy.....................................................................Failed
- hook id: mypy
- exit code: 1
tbot_contrib/time_generic_testcases/time_tescases.py:8: error: Function
is missing a type annotation for one or more arguments
tbot_contrib/time_generic_testcases/time_tescases.py:18: error: Function
is missing a type annotation for one or more arguments
----------------------------------------------------------------------
this is the part in the file that has problems
@tbot.testcase
def testcase_clockTime(testcase, *args, **kwargs) -> float:
"""Return the time that the given testcase took
you can pass any arguments that the testcase needs"""
start = time.time()
testcase(*args, **kwargs)
finish = time.time()
return finish - start
-----------------------------------------------------------------------------
the error is caused by this line : def testcase_clockTime(testcase,
*args, **kwargs)
because i did not define the types of (testcase, *args, **kwargs)
because they are intended to be generic
how can i avoid that check?
More information about the tbot
mailing list