def validate_executor_config(cls, config: dict[str, Any]):
        """
        Validate that location is a string if given and no other options are given.
        """
        if "location" in config and not isinstance(config["location"], str):
            raise ConfigValidationError(
                "The location option virtualenv executor must be a string not: "
                f"{config['location']!r}",
                global_option="executor",
            )
        extra_options = set(config.keys()) - {"type", "location"}
        if extra_options:
            raise ConfigValidationError(
                f"Unexpected keys for executor config: {extra_options!r}",
                global_option="executor",
            )

        Validate that location is a string if given and no other options are given.
        
poethepoet/executor/virtualenv.py