docstr: Test ValueError is raised if filtering non-string objects.
docstr_tok: ["Test","ValueError","is","raised","if","filtering","non-string","objects","."]
code: def test_filter_objects_key_not_provided(self) -> None:
      """Test ValueError is raised if filtering non-string objects."""
      with self.assertRaisesRegex(
          ValueError, "Please provide `key` argument"
      ):
          list(
              filter_repo_objects(
                  items=DUMMY_OBJECTS,
                  allow_patterns=["*.png", "*.jpg"],
                  ignore_patterns=".*",
              )
          )
  
file_path: huggingface_hub/tests/test_utils_paths.py
imports: import unittest
  from dataclasses import dataclass
  from pathlib import Path
  from typing import Any, Callable, List, Optional, Union
  from huggingface_hub.utils import IGNORE_GIT_FOLDER_PATTERNS, filter_repo_objects
label_desc: Use image node_id 7 for calling the TestPathsUtils obj's underlying member method code with example usage: obj.test_filter_objects_key_not_provided() without return types