Apply ruff flake8-comprehensions (#21694)
This commit is contained in:
@@ -30,7 +30,7 @@ EMPTY_ANSWER_AGG = "none"
|
||||
|
||||
def _split_thousands(delimiter, value):
|
||||
split = value.split(delimiter)
|
||||
return len(split) > 1 and any(map(lambda x: len(x) == 3, split))
|
||||
return len(split) > 1 and any((len(x) == 3 for x in split))
|
||||
|
||||
|
||||
def convert_to_float(value):
|
||||
@@ -123,7 +123,7 @@ _TOKENIZER = re.compile(r"\w+|[^\w\s]+", re.UNICODE | re.MULTILINE | re.DOTALL)
|
||||
|
||||
|
||||
def _normalize_for_match(x):
|
||||
return [t for t in _TOKENIZER.findall(x.lower())]
|
||||
return list(_TOKENIZER.findall(x.lower()))
|
||||
|
||||
|
||||
def _compare(operator, src, tgt):
|
||||
|
||||
Reference in New Issue
Block a user