parameters: ( module_file, force = False )
return_statement: return module
docstring: Load and return the module contained in a file.
    Using force = True the module will be loaded regardless
    of the criteria in _ShouldLoad.
    This will return None if the module was not allowed to be loaded.
docstring_summary: Load and return the module contained in a file.
    Using force = True the module will be loaded regardless
    of the criteria in _ShouldLoad.
    This will return None if the module was not allowed to be loaded.
docstring_tokens: Load and return the module contained in a file . Using force = True the module will be loaded regardless of the criteria in _ShouldLoad . This will return None if the module was not allowed to be loaded .
function: def Load( module_file, force = False ):
    """Load and return the module contained in a file.
    Using force = True the module will be loaded regardless
    of the criteria in _ShouldLoad.
    This will return None if the module was not allowed to be loaded."""
  
    if not module_file:
      return None
  
    if not force:
      with _module_for_module_file_lock:
        if module_file in _module_for_module_file:
          return _module_for_module_file[ module_file ]
  
      if not _ShouldLoad( module_file ):
        Disable( module_file )
        return None
  
    # This has to be here because a long time ago, the ycm_extra_conf.py files
    # used to import clang_helpers.py from the cpp folder. This is not needed
    # anymore, but there are a lot of old ycm_extra_conf.py files that we don't
    # want to break.
    sys.path.insert( 0, _PathToCppCompleterFolder() )
    module = imp.load_source( _RandomName(), module_file )
    del sys.path[ 0 ]
  
    with _module_for_module_file_lock:
      _module_for_module_file[ module_file ] = module
    return module
function_tokens: def Load ( module_file , force = False ) : if not module_file : return None if not force : with _module_for_module_file_lock : if module_file in _module_for_module_file : return _module_for_module_file [ module_file ] if not _ShouldLoad ( module_file ) : Disable ( module_file ) return None # This has to be here because a long time ago, the ycm_extra_conf.py files # used to import clang_helpers.py from the cpp folder. This is not needed # anymore, but there are a lot of old ycm_extra_conf.py files that we don't # want to break. sys . path . insert ( 0 , _PathToCppCompleterFolder ( ) ) module = imp . load_source ( _RandomName ( ) , module_file ) del sys . path [ 0 ] with _module_for_module_file_lock : _module_for_module_file [ module_file ] = module return module