chore: Enforce Mypy for non-tests (#15757)

Co-authored-by: John Bodley <john.bodley@airbnb.com>
This commit is contained in:
John Bodley
2021-07-21 11:46:43 -07:00
committed by GitHub
parent d26254099e
commit ab4e3b9bf9
20 changed files with 134 additions and 74 deletions

View File

@@ -170,9 +170,7 @@ class QueryObject:
# 2. { label: 'label_name' } - legacy format for a predefined metric
# 3. { expressionType: 'SIMPLE' | 'SQL', ... } - adhoc metric
self.metrics = metrics and [
x
if isinstance(x, str) or is_adhoc_metric(x)
else x["label"] # type: ignore
x if isinstance(x, str) or is_adhoc_metric(x) else x["label"]
for x in metrics
]