refactor: use int as the factory (#10036)

makes it thread-safe if we need in the future. Also looks a bit clean.
This commit is contained in:
skshetry
2023-10-19 15:31:33 +05:45
committed by GitHub
parent 17f5508f49
commit 5693775459
+1 -1
View File
@@ -40,7 +40,7 @@ UPDATER_INFO_STR = json.dumps(UPDATER_INFO).encode("utf8")
def make_request_handler():
class RequestHandler(SimpleHTTPRequestHandler):
# save requests count for each method
hits: Dict[str, int] = defaultdict(lambda: 0)
hits: Dict[str, int] = defaultdict(int)
def do_POST(self): # noqa: N802
# analytics endpoint