]>
git.madduck.net Git - etc/vim.git/log
madduck's git repository
Every one of the projects in this repository is available at the canonical
URL git://git.madduck.net/madduck/pub/<projectpath> — see
each project's metadata for the exact URL.
All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@ git. madduck. net .
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
SSH access, as well as push access can be individually
arranged .
If you use my repositories frequently, consider adding the following
snippet to ~/.gitconfig and using the third clone URL listed for each
project:
[url "git://git.madduck.net/madduck/"]
insteadOf = madduck:
Łukasz Langa [Thu, 17 May 2018 22:07:40 +0000 (15:07 -0700)]
Don't explode a one-element collection ending with a comma.
Łukasz Langa [Thu, 17 May 2018 21:49:31 +0000 (14:49 -0700)]
Fix overly optimistic removal of optional parentheses
The current behavior is explained with much detail in
`can_omit_invisible_parens`.
Łukasz Langa [Thu, 17 May 2018 18:52:47 +0000 (11:52 -0700)]
Don't allow indexing to trigger omitting optional parentheses
Łukasz Langa [Thu, 17 May 2018 18:20:36 +0000 (11:20 -0700)]
Fix consecutive string literals not forcing optional parentheses
Łukasz Langa [Thu, 17 May 2018 18:19:32 +0000 (11:19 -0700)]
Avoid treating ellipsis as a dot delimiter
Łukasz Langa [Thu, 17 May 2018 04:33:29 +0000 (21:33 -0700)]
Always explode data structure literals
Fixes #152
Łukasz Langa [Thu, 17 May 2018 02:35:46 +0000 (19:35 -0700)]
Consistent empty lines in the README
Hynek Schlawack [Thu, 17 May 2018 03:38:47 +0000 (23:38 -0400)]
Fix double colon (#216)
Łukasz Langa [Thu, 17 May 2018 02:19:48 +0000 (19:19 -0700)]
Fix multiline strings unnecessarily wrapped in optional parentheses
Fixes #215
Łukasz Langa [Wed, 16 May 2018 22:26:36 +0000 (15:26 -0700)]
Explain automatic parentheses management better
Łukasz Langa [Wed, 16 May 2018 22:09:02 +0000 (15:09 -0700)]
Implement fluent interfaces
Fixes #67
Łukasz Langa [Wed, 16 May 2018 21:31:37 +0000 (14:31 -0700)]
Consider `in`, `not in`, `is`, `is not` operators
Łukasz Langa [Wed, 16 May 2018 21:40:23 +0000 (14:40 -0700)]
For omitting optional parentheses, ignore delimiters of lower priorities
Łukasz Langa [Wed, 16 May 2018 18:45:32 +0000 (11:45 -0700)]
Report progress on multiple files incrementally
Łukasz Langa [Wed, 16 May 2018 05:15:28 +0000 (22:15 -0700)]
Link fix to issue
Łukasz Langa [Wed, 16 May 2018 03:52:22 +0000 (20:52 -0700)]
Don't use optional parentheses in unnecessary situations
If an expression starts or ends with a bracket and only contains a single
delimiter, don't wrap it in additional optional parentheses. We can use the
brackets for the split.
Fixes #177
Fixes #193
Łukasz Langa [Tue, 15 May 2018 20:25:00 +0000 (13:25 -0700)]
Simplify `is_trivial_*` methods
Łukasz Langa [Tue, 15 May 2018 20:05:19 +0000 (13:05 -0700)]
Document .pyi formatting
Łukasz Langa [Tue, 15 May 2018 19:18:28 +0000 (12:18 -0700)]
Warn that `right_hand_split()` modifies `bracket_depth` in leaves
Jelle Zijlstra [Tue, 15 May 2018 19:09:35 +0000 (15:09 -0400)]
Add support for pyi files (#210)
Fixes #207
Łukasz Langa [Tue, 15 May 2018 08:08:51 +0000 (01:08 -0700)]
acks += miggaiowski
Łukasz Langa [Mon, 14 May 2018 19:05:39 +0000 (12:05 -0700)]
Don't explode trailers that fit in a single line
Łukasz Langa [Mon, 14 May 2018 18:17:56 +0000 (11:17 -0700)]
Re-use indexes of current iteration in `comments_after()`
Łukasz Langa [Thu, 10 May 2018 04:40:51 +0000 (21:40 -0700)]
acks += JelleZijlstra
Łukasz Langa [Wed, 9 May 2018 23:05:12 +0000 (16:05 -0700)]
Travis workaround script no longer necessary
Miguel Gaiowski [Tue, 15 May 2018 05:13:48 +0000 (22:13 -0700)]
Check for broken symlinks before checking file data (#202)
jose nazario [Sat, 12 May 2018 17:44:30 +0000 (13:44 -0400)]
fix a spelling typo (#206)
Łukasz Langa [Wed, 9 May 2018 22:56:44 +0000 (15:56 -0700)]
Update Travis to use the default 3.7-dev binary
Łukasz Langa [Wed, 9 May 2018 22:45:38 +0000 (15:45 -0700)]
Document string prefix standardization
Vishwas B Sharma [Wed, 9 May 2018 22:26:56 +0000 (03:56 +0530)]
Adding Jupyter Notebook magic command (#200)
Jelle Zijlstra [Wed, 9 May 2018 22:26:41 +0000 (15:26 -0700)]
Remove u prefix if unicode_literals is present (#199)
Łukasz Langa [Wed, 9 May 2018 07:01:20 +0000 (00:01 -0700)]
Show badge for stable docs, not latest
Łukasz Langa [Wed, 9 May 2018 06:31:41 +0000 (23:31 -0700)]
Don't make parentheses invisible around yield expressions
Łukasz Langa [Wed, 9 May 2018 06:03:59 +0000 (23:03 -0700)]
Fix docstring of is_vararg
Łukasz Langa [Wed, 9 May 2018 04:08:07 +0000 (21:08 -0700)]
Clarify language in README
Łukasz Langa [Wed, 9 May 2018 04:01:50 +0000 (21:01 -0700)]
Automatic management of parentheses in `elif`, too
Łukasz Langa [Wed, 9 May 2018 03:59:18 +0000 (20:59 -0700)]
Support nested lambdas in BracketTracker
Łukasz Langa [Wed, 9 May 2018 00:28:40 +0000 (17:28 -0700)]
Automatic management of parentheses in assignments
Fixes #140
Note: this is an evolution but the end result needs to be different. See
cantfit.py for some good examples on bad formatting caused by this change.
Łukasz Langa [Tue, 8 May 2018 23:42:41 +0000 (16:42 -0700)]
Fix docstrings of visit_stmt and normalize_invisible_parens
Łukasz Langa [Tue, 8 May 2018 23:20:27 +0000 (16:20 -0700)]
Delimit multiline expressions according to math operator priority
Fixes #148
Łukasz Langa [Tue, 8 May 2018 22:44:44 +0000 (15:44 -0700)]
Discover whether a file is Python 3.6+ also by stars in calls
Fixes a pathological situation where if a function signature used a trailing
comma but was later reformatted to a single line (with the trailing comma
removed), Black would change its mind whether a file is Python
3.6-compatible between runs.
Codey Oxley [Wed, 9 May 2018 04:08:25 +0000 (21:08 -0700)]
Addresses #174 Neovim Error (#197)
Neovim uses stdout for `msgpack` communication and the `subprocess` call for `virtualenv` was leaking that stream. Fix is to attach to a `subprocess.PIPE`.
Łukasz Langa [Tue, 8 May 2018 01:44:18 +0000 (18:44 -0700)]
Upgrade dependencies
Łukasz Langa [Tue, 8 May 2018 01:46:16 +0000 (18:46 -0700)]
Don't fail the entire right_hand_split if an optional split failed
Fixes splitting long import lines with only a single name.
Łukasz Langa [Mon, 7 May 2018 18:36:51 +0000 (11:36 -0700)]
Diff version
Łukasz Langa [Mon, 7 May 2018 18:12:38 +0000 (11:12 -0700)]
Make parentheses invisible recursively in atoms
This fixes non-deterministic formatting when multiple pairs of removable
parentheses are used.
Fixes #183
Łukasz Langa [Mon, 7 May 2018 17:34:30 +0000 (10:34 -0700)]
Don't leave invalid trailing comma on imports
Fixes #185
Łukasz Langa [Mon, 7 May 2018 17:29:37 +0000 (10:29 -0700)]
Update README (change log; acks += skapil; acks += tiran)
Łukasz Langa [Mon, 7 May 2018 17:22:43 +0000 (10:22 -0700)]
Formatting nits
snlkapil [Mon, 7 May 2018 17:15:24 +0000 (10:15 -0700)]
Removing empty parentheses after class name (#180)
Christian Heimes [Mon, 7 May 2018 17:12:47 +0000 (19:12 +0200)]
Output something when no files are reformatted (#190)
Just executing ``black`` without any argument does not print any message
to stdout or stderr. It's rather confusing, because the user doesn't
know what happened.
In ``len(sources) == 0`` case, black now prints ``No paths given. Nothing to
do``.
Signed-off-by: Christian Heimes <christian@python.org>
Christian Heimes [Mon, 7 May 2018 17:11:21 +0000 (19:11 +0200)]
Add more files/directories to .gitignore (#191)
Ignore .tox, black.egg-info and __pycache__ directories.
Signed-off-by: Christian Heimes <christian@python.org>
Łukasz Langa [Thu, 3 May 2018 07:48:37 +0000 (00:48 -0700)]
More detailed isort configuration explanation
Christian Heimes [Fri, 4 May 2018 20:52:17 +0000 (22:52 +0200)]
Remove unnecessary shebang lines (#189)
Since black.py is not marked as executable, the shebang in black.py serves
no purpose. black should be invoked through its entry point any way.
token.py is an internal module without a __name__ == '__main__' block or
other executable code. It contains just list of constants and small
helper functions.
Signed-off-by: Christian Heimes <christian@python.org>
David Szotten [Thu, 3 May 2018 03:25:23 +0000 (04:25 +0100)]
Should this be "_cede_ control" (#187)
Zsolt Dollenstein [Tue, 1 May 2018 05:49:30 +0000 (22:49 -0700)]
Format subscriptions in a PEP-8 compliant way (#178)
Fixes #157
Zsolt Dollenstein [Sun, 29 Apr 2018 07:50:08 +0000 (00:50 -0700)]
fix type errors in setup.py (#179)
Łukasz Langa [Sat, 28 Apr 2018 20:47:59 +0000 (13:47 -0700)]
.gititnore += .vscode
Łukasz Langa [Fri, 27 Apr 2018 21:02:10 +0000 (14:02 -0700)]
18.4a4 hotfix: don't populate the cache on --check
Fixes #175
Łukasz Langa [Fri, 27 Apr 2018 00:10:40 +0000 (17:10 -0700)]
Reword inspiration
Fixes #167
Łukasz Langa [Tue, 24 Apr 2018 21:27:21 +0000 (14:27 -0700)]
Add `explode_split` to documentation
Łukasz Langa [Tue, 24 Apr 2018 20:52:12 +0000 (13:52 -0700)]
18.4a3
Łukasz Langa [Tue, 24 Apr 2018 20:44:28 +0000 (13:44 -0700)]
Split imports like isort
Fixes #127
Partially addresses #152
Łukasz Langa [Tue, 24 Apr 2018 19:40:46 +0000 (12:40 -0700)]
Do not enforce empty lines after control flow statements
Fixes #90
Łukasz Langa [Tue, 24 Apr 2018 19:19:56 +0000 (12:19 -0700)]
Split ternary expressions
Fixes #141
Jonas Obrist [Tue, 24 Apr 2018 18:56:50 +0000 (03:56 +0900)]
Make cache work with non-default line lenghts (#163)
Łukasz Langa [Tue, 24 Apr 2018 18:50:31 +0000 (11:50 -0700)]
Support sticky standalone comments (comments preceding defs, classes, and decorators)
Fixes #56
Fixes #154
Vishwas B Sharma [Tue, 24 Apr 2018 16:38:12 +0000 (09:38 -0700)]
[#154] Handle comments between decorators properly (#166)
Josh Holland [Tue, 24 Apr 2018 16:36:28 +0000 (17:36 +0100)]
Add install instructions for Vim plugin (#131)
Łukasz Langa [Mon, 23 Apr 2018 22:58:16 +0000 (15:58 -0700)]
Improve change log message
Łukasz Langa [Mon, 23 Apr 2018 22:55:32 +0000 (15:55 -0700)]
Allow standalone comments to close code blocks
Fixes #16
Fixes #32
Łukasz Langa [Mon, 23 Apr 2018 21:31:35 +0000 (14:31 -0700)]
Accelerate Unicode identifier support (backport from Lib/tokenize.py)
Łukasz Langa [Mon, 23 Apr 2018 21:24:14 +0000 (14:24 -0700)]
Remove nonsensical grammar from blib2to3
Gregory P. Smith [Mon, 23 Apr 2018 21:19:24 +0000 (14:19 -0700)]
Put the PSF license in blib2to3/ to mark that code. (#162)
The blib2to3/ code is PSF licensed as that is where the code originated.
This change just drops a proper copy of that license file into the
directory tree to make that clear.
Łukasz Langa [Mon, 23 Apr 2018 19:00:03 +0000 (12:00 -0700)]
Show full path on diffs
Fixes #130
Łukasz Langa [Mon, 23 Apr 2018 18:48:58 +0000 (11:48 -0700)]
acks += csurfer
Łukasz Langa [Mon, 23 Apr 2018 18:48:01 +0000 (11:48 -0700)]
Refactor `reformat_one` and `schedule_formatting` to decrease state
Zsolt Dollenstein [Mon, 23 Apr 2018 18:23:36 +0000 (19:23 +0100)]
Fix tests on windows (#159)
Vishwas B Sharma [Mon, 23 Apr 2018 18:23:11 +0000 (11:23 -0700)]
[#149] Make check and diff not mutually exclusive (#161)
Fixes #149.
Łukasz Langa [Sat, 21 Apr 2018 22:32:01 +0000 (15:32 -0700)]
Add AppVeyor for Windows builds
Łukasz Langa [Sat, 21 Apr 2018 22:08:36 +0000 (15:08 -0700)]
Move delimiter token skipping to BracketTracker
Also, added lambda argument delimiter skipping.
Fixes #133
Zsolt Dollenstein [Sat, 21 Apr 2018 19:16:02 +0000 (20:16 +0100)]
Skip handling signals on event loops that don't support it (#156)
Jonas Obrist [Sat, 21 Apr 2018 19:15:13 +0000 (04:15 +0900)]
fixed cache file location in readme (#150)
Łukasz Langa [Thu, 19 Apr 2018 05:43:23 +0000 (22:43 -0700)]
Remove dead code
Łukasz Langa [Thu, 19 Apr 2018 05:29:01 +0000 (22:29 -0700)]
Print exact Python version with build date
Łukasz Langa [Thu, 19 Apr 2018 05:17:18 +0000 (22:17 -0700)]
acks += ojii
Łukasz Langa [Thu, 19 Apr 2018 05:17:00 +0000 (22:17 -0700)]
Store pickles for 3.8.0a0
Łukasz Langa [Thu, 19 Apr 2018 02:36:39 +0000 (19:36 -0700)]
Solve the Travis failure with 3.7 from deadsnakes
Łukasz Langa [Thu, 19 Apr 2018 01:19:04 +0000 (18:19 -0700)]
Update documentation
* Add "Ignore non-modified files" from the README
* Add missing functions to the reference
Łukasz Langa [Thu, 19 Apr 2018 01:13:36 +0000 (18:13 -0700)]
Docstring for `max_delimiter_priority_in_atom()`
Łukasz Langa [Thu, 19 Apr 2018 00:59:28 +0000 (17:59 -0700)]
Simplify single-file vs. multi-file modes
Łukasz Langa [Thu, 19 Apr 2018 00:46:03 +0000 (17:46 -0700)]
Revert `format_file_in_place()` and `format_stdin_to_stdout()` to return bools
`Changed.CACHED` is meaningless for those two functions.
Łukasz Langa [Thu, 19 Apr 2018 00:41:49 +0000 (17:41 -0700)]
Update 3.6.4 grammar pickle
Jonas Obrist [Thu, 19 Apr 2018 00:27:07 +0000 (09:27 +0900)]
Added caching (#136)
Black will cache already formatted files using their file size and
modification timestamp. The cache is per-user and will always be used
unless Black is used with --diff or with code provided via standard
input.
jgirardet [Tue, 17 Apr 2018 20:24:29 +0000 (22:24 +0200)]
add sublack plugin for sublimetext (#137)
Zsolt Dollenstein [Tue, 17 Apr 2018 19:52:17 +0000 (20:52 +0100)]
Merge pull request #138 from ambv/star-expr
Parse complex expressions in parameters after * and **
Zsolt Dollenstein [Tue, 17 Apr 2018 19:46:40 +0000 (20:46 +0100)]
Add changelog entry
Zsolt Dollenstein [Tue, 17 Apr 2018 19:28:25 +0000 (20:28 +0100)]
use STARS instead of STAR | DOUBLESTAR
Zsolt Dollenstein [Tue, 17 Apr 2018 08:04:35 +0000 (09:04 +0100)]
Parse complex expressions in parameters after * and **
Łukasz Langa [Mon, 16 Apr 2018 08:32:09 +0000 (01:32 -0700)]
Generalize star expression handling
Fixes #132