original_docstring: Converts a filename into a dotted module name.
docstring: Converts a filename into a dotted module name.
docstring_tokens: Converts a filename into a dotted module name .
code: def path_to_module_name(filename):
    """Converts a filename into a dotted module name."""
    if os.path.dirname(filename).startswith(os.pardir):
      # Don't try to infer a module name for filenames starting with ../
      return None
    # TODO(mdemello): should we validate the extension?
    filename, _ = os.path.splitext(filename)
    module_name = filename.replace(os.path.sep, ".")
    # strip __init__ suffix
    module_name, _, _ = module_name.partition(".__init__")
    return module_name
code_tokens: def path_to_module_name ( filename ) : if os . path . dirname ( filename ) . startswith ( os . pardir ) : return None filename , _ = os . path . splitext ( filename ) module_name = filename . replace ( os . path . sep , "." ) module_name , _ , _ = module_name . partition ( ".__init__" ) return module_name
short_docstring: Converts a filename into a dotted module name.
short_docstring_tokens: Converts a filename into a dotted module name .
comment: """Converts a filename into a dotted module name."""$SEP$# Don't try to infer a module name for filenames starting with ../$SEP$# TODO(mdemello): should we validate the extension?$SEP$# strip __init__ suffix