From fbcfafdac3d3c6efef38e3d14c9a29b0237bf9b1 Mon Sep 17 00:00:00 2001 From: Tobias Schmidl Date: Mon, 21 Sep 2020 08:10:22 +0200 Subject: [PATCH] added first draft --- httping.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/httping.py b/httping.py index a8d255d..eca53cc 100755 --- a/httping.py +++ b/httping.py @@ -16,6 +16,8 @@ import statistics # for median and stdev import sys # for redirecting print to stderr import requests # for the central HTTP HEAD request +from typing import (List) +from __future__ import annotations __author__ = "Tobias Schmidl" __copyright__ = "Copyright 2018, Tobias Schmidl" @@ -23,10 +25,10 @@ __license__ = "MIT" __version__ = "0.0.1" __maintainer__ = "Tobias Schmidl" -MAX_PING = datetime.timedelta(milliseconds=1000) # in seconds -TARGETS = ["https://www.google.de", "https://www.bing.com", "https://www.wikipedia.org"] +MAX_PING: int = datetime.timedelta(milliseconds=1000) # in seconds +TARGETS: List[str] = ["https://www.google.de", "https://www.bing.com", "https://www.wikipedia.org"] -MAX_PING_IN_MS = MAX_PING.total_seconds() * 1000 +MAX_PING_IN_MS: int = MAX_PING.total_seconds() * 1000 def in_bucket(element, bucket):