mypy: Use str in statsd_key.

This commit is contained in:
Steve Howell 2020-09-29 14:29:22 +00:00 committed by Tim Abbott
parent 2c496d9afd
commit bee18c70f0
1 changed files with 1 additions and 4 deletions

View File

@ -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('-', "_")