Static type analysis

This commit is contained in:
Joel Collins 2020-11-30 13:36:45 +00:00
parent 3aebb8bead
commit 7866ec0f47
63 changed files with 1825 additions and 2722 deletions

View file

@ -16,7 +16,7 @@ class SleepFor(ActionView):
args = {"time": fields.Float(description="Time to sleep, in seconds", example=0.5)}
def post(self, args):
sleep_time = args.get("time")
sleep_time: int = args.get("time", 0)
logging.info("Going to sleep for %s...", sleep_time)
start = time.time()
time.sleep(sleep_time)