class_docstr: Jupytext Configuration's options
docstr: Return the default formats, if they apply to the current path #157
docstr_tok: ["Return","the","default","formats",",","if","they","apply","to","the","current","path","#","157"]
code: def default_formats(self, path):
      """Return the default formats, if they apply to the current path #157"""
      from .paired_paths import InconsistentPath, base_path
  
      if self.default_jupytext_formats:
          warnings.warn(
              "The option 'default_jupytext_formats' is deprecated. "
              "Please use 'formats' instead.",
              FutureWarning,
          )
  
      formats = self.formats or self.default_jupytext_formats
      for fmt in long_form_multiple_formats(formats):
          try:
              base_path(path, fmt)
              return formats
          except InconsistentPath:
              continue
  
      return None
  
imports: import json
  import os
  import warnings
  import yaml
  from traitlets import Bool, Dict, Enum, Float, List, Unicode, Union
  from traitlets.config import Configurable
  from traitlets.config.loader import PyFileConfigLoader
  from traitlets.traitlets import TraitError
  from .formats import NOTEBOOK_EXTENSIONS, long_form_multiple_formats, long_form_one_format, short_form_multiple_formats
label_desc: Use image node_id 2 for calling the JupytextConfiguration obj's underlying member method code with example usage: obj.default_formats(path) and returns: None, formats