From bee18c70f09c696c9b6199956f7d952d30983551 Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Tue, 29 Sep 2020 14:29:22 +0000 Subject: [PATCH] mypy: Use str in statsd_key. --- zerver/lib/utils.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/zerver/lib/utils.py b/zerver/lib/utils.py index ff0fb414e8..3e1a3d23e0 100644 --- a/zerver/lib/utils.py +++ b/zerver/lib/utils.py @@ -11,10 +11,7 @@ from django.conf import settings T = TypeVar('T') -def statsd_key(val: Any, clean_periods: bool=False) -> str: - if not isinstance(val, str): - val = str(val) - +def statsd_key(val: str, clean_periods: bool=False) -> str: if ':' in val: val = val.split(':')[0] val = val.replace('-', "_")