          format_module_path = settings.FORMAT_MODULE_PATH
  
      format_locations = []
      if format_module_path:
          if isinstance(format_module_path, six.string_types):
              format_module_path = [format_module_path]
          for path in format_module_path:
              format_locations.append(path + '.%s')
      format_locations.append('django.conf.locale.%s')
      locale = to_locale(lang)
 
</s> remove             if isinstance(r, six.string_types):
 </s> add             if isinstance(r, str): </s> remove     if isinstance(path, six.string_types):
 </s> add     if isinstance(path, str): </s> remove         if not isinstance(string_if_invalid, six.string_types):
 </s> add         if not isinstance(string_if_invalid, str): </s> remove             if isinstance(reply_to, six.string_types):
 </s> add             if isinstance(reply_to, str): </s> remove             if isinstance(bcc, six.string_types):
 </s> add             if isinstance(bcc, str):
        if isinstance(format_module_path, str):
          format_module_path = settings.FORMAT_MODULE_PATH
  
      format_locations = []
      if format_module_path:
        if isinstance(format_module_path, str):
              format_module_path = [format_module_path]
          for path in format_module_path:
              format_locations.append(path + '.%s')
      format_locations.append('django.conf.locale.%s')
      locale = to_locale(lang)
keep keep keep keep replace keep keep keep keep keep
 Refs #23919 -- Removed six.<various>_types usage

Thanks Tim Graham and Simon Charette for the reviews. 
django/utils/formats.py