Apply ruff flake8-comprehensions (#21694)
This commit is contained in:
@@ -320,7 +320,7 @@ class TFLayoutLMv3ModelTest(TFModelTesterMixin, unittest.TestCase):
|
||||
# The number of elements in the loss should be the same as the number of elements in the label
|
||||
prepared_for_class = self._prepare_for_class(inputs_dict.copy(), model_class, return_labels=True)
|
||||
added_label = prepared_for_class[
|
||||
sorted(list(prepared_for_class.keys() - inputs_dict.keys()), reverse=True)[0]
|
||||
sorted(prepared_for_class.keys() - inputs_dict.keys(), reverse=True)[0]
|
||||
]
|
||||
expected_loss_size = added_label.shape.as_list()[:1]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user