class_docstr: Handles metadata supplied in configuration files.
class_docstr_tok: ["Handles","metadata","supplied","in","configuration","files","."]
docstr: Returns a parser function to make sure field inputs
  are not files.
  
  Parses a value after getting the key so error messages are
  more informative.
  
  :param key:
  :rtype: callable
docstr_tok: ["Returns","a","parser","function","to","make","sure","field","inputs","are","not","files",".","Parses","a","value","after","getting","the","key","so","error","messages","are","more","informative",".",":","param","key",":",":","rtype",":","callable"]
code: def _exclude_files_parser(cls, key):
      """Returns a parser function to make sure field inputs
      are not files.
  
      Parses a value after getting the key so error messages are
      more informative.
  
      :param key:
      :rtype: callable
      """
  
      def parser(value):
          exclude_directive = "file:"
          if value.startswith(exclude_directive):
              raise ValueError(
                  "Only strings are accepted for the {0} field, "
                  "files are not accepted".format(key)
              )
          return value
  
      return parser
  
imports: import contextlib
  import functools
  import os
  from collections import defaultdict
  from functools import partial
  from functools import wraps
  from typing import TYPE_CHECKING, Callable, Any, Dict, Generic, Iterable, List, Optional, Set, Tuple, TypeVar, Union
  from ..errors import FileError, OptionError
  from ..extern.packaging.markers import default_environment
  from ..extern.packaging.requirements import InvalidRequirement, Requirement
  from ..extern.packaging.specifiers import SpecifierSet
  from ..extern.packaging.version import InvalidVersion, Version
  from ..warnings import SetuptoolsDeprecationWarning
  from .None import expand
label_desc: Use image node_id 8 for calling the ConfigHandler obj's underlying member method code with example usage: obj._exclude_files_parser(cls, key) and returns: parser, value