diff --git a/dvc/parsing/__init__.py b/dvc/parsing/__init__.py index c62ce2c00..adf50d495 100644 --- a/dvc/parsing/__init__.py +++ b/dvc/parsing/__init__.py @@ -502,7 +502,7 @@ class MatrixDefinition: # Matrix entries will have `key` and `item` added to the context. # Warn users if these are already in the context from the global vars. - self._warn_if_overwriting(["key", "item"]) + self._warn_if_overwriting([self.pair.key, self.pair.value]) return iterable def _warn_if_overwriting(self, keys: List[str]):