π Geometric Computer Vision Library for Spatial AI
Python artificial-intelligencecomputer-visiondeep-learninghacktoberfestimage-processingmachine-learningneural-networkpythonpytorchroboticsspatial-ai
Remove unnecessary comprehension (#1085)
deepsource-autofix[bot]39cb2c3e0d97
diff --git a/kornia/augmentation/container/augment.py b/kornia/augmentation/container/augment.pyindex 66da62d7c..3ebe893f3 100644--- a/kornia/augmentation/container/augment.py+++ b/kornia/augmentation/container/augment.py@@ -67,7 +67,7 @@ class AugmentationSequential(ImageSequential):self.data_keys = [DataKey.get(inp) for inp in data_keys]assert all(- [in_type in DataKey for in_type in self.data_keys]+ in_type in DataKey for in_type in self.data_keys), f"`data_keys` must be in {DataKey}. Got {data_keys}."if self.data_keys[0] != DataKey.INPUT:diff --git a/kornia/constants.py b/kornia/constants.pyindex b4f6ddee3..eb80e3884 100644--- a/kornia/constants.py+++ b/kornia/constants.py@@ -25,10 +25,10 @@ class EnumMetaFlags(EnumMeta):def __contains__(self, other: Union[str, int, T]) -> bool: # type: ignoreif type(other) == str:other = cast(str, other)- return any([val.name == other.upper() for val in self]) # type: ignore+ return any(val.name == other.upper() for val in self) # type: ignoreif type(other) == int:- return any([val.value == other for val in self]) # type: ignore- return any([val == other for val in self]) # type: ignore+ return any(val.value == other for val in self) # type: ignore+ return any(val == other for val in self) # type: ignoredef __repr__(self):return ' | '.join(f"{self.__name__}.{val.name}" for val in self)