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):