| Commit message (Collapse) | Author | Age |
|
|
|
| |
It has nothing whatsoever to do with the database.
|
|
|
|
|
| |
Make it a plain container around raw data and a few bits of metadata,
rather than around a whole MIME part.
|
| |
|
|
|
|
|
|
|
|
| |
It just adds unnecessary type confusion.
In most places where it is used, the types are always str, so it does
nothing. In the few others, the encoding/decoding is better handled
explicitly.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This has really annoyed me for a while, the search is reversed from vim.
In alot currently up is older searches, whiles down is newer. In vim
it's reversed.
|
|
|
|
| |
They are not needed for python >= 3.0.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
The code currently uses "cursor up", which seems wrong to me. This
corrects searching through prompt history only moving in one direction.
Fixes #1216
|
| | |
|
|/
|
|
|
|
|
| |
in python3 dict.{keys,items,values} return views, which are similar to
iterators without some of the caveats about modifying the underlying
object. The iter* and view* methods have been removed, instead one warps
dict.x in iter or list to get those types.
|
| |
|
|
|
|
| |
and a list of return objects for choices.
|
|\ |
|
| |
| |
| |
| |
| | |
This mostly shortens lines down to <=79 chars and fixes some other small
things I found using the pep8 tool.
|
|/ |
|
|
|
|
|
|
|
|
|
| |
The old implementation would raise an error when the translated tag
string was a unicode string (might be defined as an abbreviation in the
users config).
The official docs suggest this kind of implementation:
https://docs.python.org/3/reference/datamodel.html#object.__hash__
|
|
|
|
|
|
| |
Implementing the comparison functions as a shared method rather than in
terms of each other (as functools.totalordering does) makes the
search interface much snappier.
|
|
|
|
|
|
|
|
| |
Which is required in python3 when implementing the __eq__ method.
The implementation caches the hash method, since it's being called each
time the focus is changed in the search view. This doesn't really seem
correct to me, but I'm not sure it's wrong.
|
|
|
|
|
|
|
| |
This can create circular imports in unittests, which causes difficult to
debug errors.
Fixes #1076
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The calculation wants to sort first by length, then by string value (so
'z' would come before 'aa'). The calculation does this by deciding that
if one value has a length of 1, and the other doesn't. Currently it does
this by calling min, and max, and calling len 4 times. This is
pretty inefficient, and more complicated that necessary.
Instead, this patch uses 'is not' with booleans to figure out if one and
only one of the lengths is 1.
|
|
|
|
|
|
| |
This is both a performance issue (since cmp is slower than rich
comparisons), and a python3 issue since cmp (and __cmp__) are gone in
python 3.
|
|\
| |
| | |
Use absolute_imports from __future__
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
| |
This patch replaces a number of uses of dict.items, dict.values, and
dict.keys with their iterative siblings. The advantage of using the
iterator version is that they don't copy the keys, values, or items, but
simply return references. This reduces memory usage and may speed up the
these operations a bit.
|
| |
|
| |
|
|
|
|
|
|
| |
- use relative imports if possible
- group imports into standard library, third party, and alot modules
- sort imports alphabetically
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
don't insert spaces in case the completions set is unary
(no results found)
|
|
|
|
|
|
|
|
| |
this makes the CompleteEdit widget handle errors
raised during completions by passing them on to
a 'on_error' callback given to its constructor.
This is then used in UI.prompt.
|
| |
|
|
|
|
| |
cf issue #514
|
|
|
|
| |
cf issue #513
|
|
|
|
|
|
|
|
|
|
| |
This moves the Command creation/application
to UI.input_filter. This function gets directly triggered by the mainloop.
We hardcode "esc" and "enter" to widgets.globals.ChoiceWidget and CompleteEdit and thus ditch the
abstraction to "cancel" and "select" keypresses.
This obsolets the extra InputWrap widget in UI and
the global SendKeypressCommand and generally makes UI less messy.
|
| |
|
|
|