Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: vim-scripts/pythoncomplete
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: meermanr/pythoncomplete
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 7 commits
  • 1 file changed
  • 2 contributors

Commits on Feb 4, 2012

  1. Feature: Callable parameter completion

    Prior to this patch opening parenthesis were not considered part of the
    current word, so a completion token such as ``myfunc(`` would never test
    positive for a trailing ``(``.
    Robert Meerman authored and meermanr committed Feb 4, 2012
    Configuration menu
    Copy the full SHA
    37da0f3 View commit details
    Browse the repository at this point in the history
  2. Fix: Completion of class initialiser parameters

    This patch fixes completion of parameters required by a class when
    creating a new instance. For example completing ``MyClass(`` should take
    the parameters from ``MyClass.__init__``.
    
    The ``_ctor`` closure within ``Completer.get_arguments`` always raised a
    NameError exception because the function signature named its incoming argument
    ``obj`` rather than ``class_ob``.
    Robert Meerman authored and meermanr committed Feb 4, 2012
    Configuration menu
    Copy the full SHA
    c754544 View commit details
    Browse the repository at this point in the history
  3. Fix: Parameter completion for meta-classes

    The test that determined if ``func_obj`` is a class did not cope with
    meta-classes (which are both a class, and a type). Generally ``type()``
    is not a robust way to reason about the Python objects, so this patch
    replaces all checks of the form::
    
        type(foo) == types.FooType
    
    with calls to the ``inspect`` module, for instance::
    
        inspect.isclass(foo)
        inspect.ismethod(foo)
        inspect.isfuction(foo)
    Robert Meerman authored and meermanr committed Feb 4, 2012
    Configuration menu
    Copy the full SHA
    53d7719 View commit details
    Browse the repository at this point in the history
  4. Change: Parameter completion now has spaces between parameters

    Completed parameters are space and comma seperated, instead of just
    being comma seperated. Old behaviour::
    
        myfunc(a,b,c)
    
    New behaviour::
    
        myfunc(a, b, c)
    
    This better matches common practice, and the exampels in PEP 8 [1]_. If
    this upsets established users, a configuration variable could be created
    to control it.
    
    .. [1] http://www.python.org/dev/peps/pep-0008/
    Robert Meerman authored and meermanr committed Feb 4, 2012
    Configuration menu
    Copy the full SHA
    8a727d5 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c90856c View commit details
    Browse the repository at this point in the history

Commits on Feb 11, 2012

  1. Fix compatability with Vim (v7.3) ftplugin detection.

    This patch renames ``pythoncomplete.py`` to ``python_complete.py`` since
    the latter is automatically loaded by Vim (tested with v7.3).
    
    Using Vim's tracing feature (e.g. ``vim -Vtrace.log somefile.py``) I
    discovered that Vim does not automatically load
    ``$HOME/.vim/ftplugin/pythoncomplete.vim`` without additional
    configuration, it only considers the following::
    
        Searching for
    
            ftplugin/python.vim
            ftplugin/python_*.vim
            ftplugin/python/*.vim
    
        in
    
            $HOME/.vim
            /var/lib/vim/addons
            /usr/share/vim/vimfiles
            /usr/share/vim/vim73
            /usr/share/vim/vimfiles/after
            /var/lib/vim/addons/after
            $HOME/.vim/after
    
    Note that the default distribution of Vim v7.3 [1]_ includes
    `ftplugin/python.vim` which contains the following line::
    
        setlocal omnifunc=pythoncomplete#Complete
    
    This conflicts with the changed introduced in this patch, and is no longer
    needed (since this script now sets 'omnifunc' itself).
    
    .. [1] At least, it does on Ubuntu v11.10's "vim-runtime" package, version
           "2:7.3.154+hg~74503f6ee649-2ubuntu3"
    meermanr committed Feb 11, 2012
    Configuration menu
    Copy the full SHA
    0d9ccb3 View commit details
    Browse the repository at this point in the history
  2. Change installation direction from ftplugin/ to after/ftplugin/

    Until the stock `ftplugin/python.vim` drops its definition for
    'omnifunc' `python_complete.vim` must be loaded after system defaults to
    ensure it is actually used.
    
    Should this version of `python_complete.vim` become the new stock
    version, users should install future updates into `$HOME/.vim/ftplugin`,
    since a guard at the top of the script will preventing existing
    definitions being replaced.
    meermanr committed Feb 11, 2012
    Configuration menu
    Copy the full SHA
    ee51a24 View commit details
    Browse the repository at this point in the history
Loading