]> 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:

etc/vim.git
6 years agoReformat docs/conf.py, too.
Łukasz Langa [Mon, 4 Jun 2018 19:24:20 +0000 (12:24 -0700)]
Reformat docs/conf.py, too.

6 years agoFix missing leading slash due to `relative_to()` resolution
Łukasz Langa [Mon, 4 Jun 2018 19:18:27 +0000 (12:18 -0700)]
Fix missing leading slash due to `relative_to()` resolution

6 years agoAdd `--verbose` and report excluded paths in it, too
Łukasz Langa [Mon, 4 Jun 2018 18:58:26 +0000 (11:58 -0700)]
Add `--verbose` and report excluded paths in it, too

Fixes #283

6 years ago[trivial] Simplify `mode` and `write_back` calculation in main()
Łukasz Langa [Mon, 4 Jun 2018 18:20:15 +0000 (11:20 -0700)]
[trivial] Simplify `mode` and `write_back` calculation in main()

6 years ago[trivial] Simplify stdin handling
Łukasz Langa [Mon, 4 Jun 2018 18:06:38 +0000 (11:06 -0700)]
[trivial] Simplify stdin handling

6 years agoRevert "don't run tests from /build"
Łukasz Langa [Mon, 4 Jun 2018 18:03:45 +0000 (11:03 -0700)]
Revert "don't run tests from /build"

This reverts commit 1687892d63fdff7525bb50a0166db3c5214ce2de.

This is no longer necessary with the fix in the previous commit.

6 years agoIntroduce "project root" as a concept
Łukasz Langa [Mon, 4 Jun 2018 17:59:36 +0000 (10:59 -0700)]
Introduce "project root" as a concept

This is required for regular expressions in `--include=` and `--exclude=` not
to catch false positives from directories outside of the project.

6 years agoAdd .pie from tests to MANIFEST.in
Łukasz Langa [Fri, 1 Jun 2018 21:14:22 +0000 (14:14 -0700)]
Add .pie from tests to MANIFEST.in

6 years ago`python_version` => `language_version` (#296)
Anthony Sottile [Sun, 3 Jun 2018 18:46:59 +0000 (11:46 -0700)]
`python_version` => `language_version` (#296)

Noticed this in `pytest`'s config -- `python_version` isn't a thing :D

6 years agodon't run tests from /build
Zsolt Dollenstein [Fri, 1 Jun 2018 22:12:20 +0000 (23:12 +0100)]
don't run tests from /build

6 years agoSkip symlink test if can't create one (#287)
Zsolt Dollenstein [Fri, 1 Jun 2018 21:47:07 +0000 (23:47 +0200)]
Skip symlink test if can't create one (#287)

6 years agoDon't over-eagerly make a path absolute if only one passed
Łukasz Langa [Fri, 1 Jun 2018 02:47:24 +0000 (19:47 -0700)]
Don't over-eagerly make a path absolute if only one passed

If a directory or more than one file is passed, Black nicely shows the relative
paths in output.  Before this change, it showed an absolute path if only
a single file was passed as an argument.  This fixes the inconsistency.

6 years agoMake empty --include mean "anything goes", simplify `gen_python_files_in_dir`
Łukasz Langa [Fri, 1 Jun 2018 02:40:07 +0000 (19:40 -0700)]
Make empty --include mean "anything goes", simplify `gen_python_files_in_dir`

6 years agoReorder command-line options
Łukasz Langa [Fri, 1 Jun 2018 02:24:09 +0000 (19:24 -0700)]
Reorder command-line options

6 years agoSort default excludes, include the leading slash
Łukasz Langa [Fri, 1 Jun 2018 02:09:51 +0000 (19:09 -0700)]
Sort default excludes, include the leading slash

6 years agoAdded --include and --exclude cli options (#281)
Mika⠙ [Fri, 1 Jun 2018 00:51:15 +0000 (02:51 +0200)]
Added --include and --exclude cli options (#281)

These 2 options allow you to pass in regular expressions that determine
whether files/directories are included or excluded in the recursive file
search.

Fixes #270

6 years agoacks += Stavros; document fix, add to Pipfile
Łukasz Langa [Thu, 31 May 2018 17:53:26 +0000 (10:53 -0700)]
acks += Stavros; document fix, add to Pipfile

6 years agoSpecify the minimum click version (#284)
Stavros Korokithakis [Thu, 31 May 2018 17:46:05 +0000 (19:46 +0200)]
Specify the minimum click version (#284)

6 years agoAdd --skip-string-normalization
Łukasz Langa [Wed, 30 May 2018 19:54:52 +0000 (12:54 -0700)]
Add --skip-string-normalization

Fixes #118

6 years agoImprove doc regarding PyCharm keyboard shortcut (#271)
LukasDrude [Tue, 29 May 2018 21:50:15 +0000 (23:50 +0200)]
Improve doc regarding PyCharm keyboard shortcut (#271)

6 years agoMove setuptools and wheel to dev deps, upgrade them, too
Łukasz Langa [Tue, 29 May 2018 09:37:34 +0000 (02:37 -0700)]
Move setuptools and wheel to dev deps, upgrade them, too

6 years ago18.5b1
Łukasz Langa [Tue, 29 May 2018 09:07:09 +0000 (02:07 -0700)]
18.5b1

6 years agoChange minor whitespace in "Usage"
Łukasz Langa [Tue, 29 May 2018 09:04:57 +0000 (02:04 -0700)]
Change minor whitespace in "Usage"

6 years agoRefactor --pyi and --py36 into FileMode
Łukasz Langa [Tue, 29 May 2018 08:53:54 +0000 (01:53 -0700)]
Refactor --pyi and --py36 into FileMode

6 years agoMention fix for #196 in the README
Łukasz Langa [Tue, 29 May 2018 08:12:16 +0000 (01:12 -0700)]
Mention fix for #196 in the README

6 years agoClean up PEP 257 support
Łukasz Langa [Tue, 29 May 2018 07:47:52 +0000 (00:47 -0700)]
Clean up PEP 257 support

I documented the new behavior, added it to the change log, greatly expanded
tests, added support for inner defs and classes, and added Luka to ACKS.

Fixes #196

6 years agoClass new line between docstrings / vars / methods (#219)
Luka Sterbic [Tue, 29 May 2018 06:48:59 +0000 (08:48 +0200)]
Class new line between docstrings / vars / methods (#219)

Partially addresses #144

6 years agoFix dangling file in documentation
Łukasz Langa [Tue, 29 May 2018 06:19:40 +0000 (23:19 -0700)]
Fix dangling file in documentation

6 years agoReword isort configuration, add --combine-as
Łukasz Langa [Tue, 29 May 2018 06:15:07 +0000 (23:15 -0700)]
Reword isort configuration, add --combine-as

6 years agoAdd isort args to README (#268)
Jason Friedland [Tue, 29 May 2018 06:06:02 +0000 (16:06 +1000)]
Add isort args to README (#268)

6 years agoAdd instructions for running Black on save in Vim (#255)
Mahmoud Hossam [Sat, 26 May 2018 20:01:17 +0000 (22:01 +0200)]
Add instructions for running Black on save in Vim (#255)

6 years agoRemove remains of extra empty lines for flow control statements
Łukasz Langa [Thu, 24 May 2018 20:32:52 +0000 (13:32 -0700)]
Remove remains of extra empty lines for flow control statements

6 years agoReword --pyi and --py36 documentation
Łukasz Langa [Wed, 23 May 2018 18:52:41 +0000 (11:52 -0700)]
Reword --pyi and --py36 documentation

6 years agoUpdate changelog for PR 249.
Carl Meyer [Wed, 23 May 2018 18:13:13 +0000 (12:13 -0600)]
Update changelog for PR 249.

6 years agoAdd --pyi and --py36 flags (#249)
Carl Meyer [Wed, 23 May 2018 18:01:27 +0000 (12:01 -0600)]
Add --pyi and --py36 flags (#249)

Fixes #244.

6 years agotweak grammar in docs about fluent interfaces (#247)
wouter bolsterlee [Tue, 22 May 2018 15:54:28 +0000 (17:54 +0200)]
tweak grammar in docs about fluent interfaces (#247)

...to make the sentence a bit easier to understand.

6 years agoFix unstable formatting on trailers omitted from line splitting with comments
Łukasz Langa [Tue, 22 May 2018 07:38:31 +0000 (00:38 -0700)]
Fix unstable formatting on trailers omitted from line splitting with comments

Fixes #238

6 years agoFix invalid code on stars in long from-imports being wrapped in parentheses
Łukasz Langa [Mon, 21 May 2018 23:35:45 +0000 (16:35 -0700)]
Fix invalid code on stars in long from-imports being wrapped in parentheses

Fixes #234

6 years agoFix optional parentheses being removed within `# fmt: off` sections
Łukasz Langa [Mon, 21 May 2018 22:20:19 +0000 (15:20 -0700)]
Fix optional parentheses being removed within `# fmt: off` sections

Fixes #224

6 years agoSentence case (#242)
Hugo [Mon, 21 May 2018 20:20:41 +0000 (23:20 +0300)]
Sentence case (#242)

6 years agoFix invalid code in an omitted trailer on large expressions
Łukasz Langa [Mon, 21 May 2018 19:29:36 +0000 (12:29 -0700)]
Fix invalid code in an omitted trailer on large expressions

Fixes #237

6 years agoMention fix for pickle files
Łukasz Langa [Mon, 21 May 2018 18:22:08 +0000 (11:22 -0700)]
Mention fix for pickle files

6 years agoAdd navigation (#229)
Carol Willing [Mon, 21 May 2018 16:58:04 +0000 (09:58 -0700)]
Add navigation (#229)

6 years agoREADME updates (#235)
Hugo [Sun, 20 May 2018 16:50:41 +0000 (19:50 +0300)]
README updates (#235)

* Consistent titles in 'Sentence case'
* Add console Markdown formatting
* Fix macOS typos
* Fix Homebrew typo

6 years agoStore grammar pickle caches in CACHE_DIR
Łukasz Langa [Sat, 19 May 2018 21:04:38 +0000 (14:04 -0700)]
Store grammar pickle caches in CACHE_DIR

Fixes #192

Fixes #203

6 years agoInclude blib2to3 LICENSE file (#230)
Christian Heimes [Sat, 19 May 2018 20:09:20 +0000 (22:09 +0200)]
Include blib2to3 LICENSE file (#230)

See: https://github.com/ambv/black/issues/226
Signed-off-by: Christian Heimes <christian@python.org>
6 years agoRemove grammar pickles from git (#225)
Christian Heimes [Fri, 18 May 2018 20:59:05 +0000 (16:59 -0400)]
Remove grammar pickles from git (#225)

There is no need to keep the pickled grammar files in git. PR #203 will
move them into a user-specific cache directory any way.

See: https://github.com/ambv/black/issues/192
Signed-off-by: Christian Heimes <christian@python.org>
6 years agoInclude stub files (*.pyi) (#222)
Christian Heimes [Fri, 18 May 2018 17:24:15 +0000 (13:24 -0400)]
Include stub files (*.pyi) (#222)

Fixes: https://github.com/ambv/black/issues/221
Signed-off-by: Christian Heimes <christian@python.org>
6 years ago18.5b0
Łukasz Langa [Fri, 18 May 2018 00:31:22 +0000 (17:31 -0700)]
18.5b0

6 years agoDon't explode a one-element collection ending with a comma.
Łukasz Langa [Thu, 17 May 2018 22:07:40 +0000 (15:07 -0700)]
Don't explode a one-element collection ending with a comma.

6 years agoFix overly optimistic removal of optional parentheses
Ł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`.

6 years agoDon't allow indexing to trigger omitting optional parentheses
Łukasz Langa [Thu, 17 May 2018 18:52:47 +0000 (11:52 -0700)]
Don't allow indexing to trigger omitting optional parentheses

6 years agoFix consecutive string literals not forcing optional parentheses
Łukasz Langa [Thu, 17 May 2018 18:20:36 +0000 (11:20 -0700)]
Fix consecutive string literals not forcing optional parentheses

6 years agoAvoid treating ellipsis as a dot delimiter
Łukasz Langa [Thu, 17 May 2018 18:19:32 +0000 (11:19 -0700)]
Avoid treating ellipsis as a dot delimiter

6 years agoAlways explode data structure literals
Łukasz Langa [Thu, 17 May 2018 04:33:29 +0000 (21:33 -0700)]
Always explode data structure literals

Fixes #152

6 years agoConsistent empty lines in the README
Łukasz Langa [Thu, 17 May 2018 02:35:46 +0000 (19:35 -0700)]
Consistent empty lines in the README

6 years agoFix double colon (#216)
Hynek Schlawack [Thu, 17 May 2018 03:38:47 +0000 (23:38 -0400)]
Fix double colon (#216)

6 years agoFix multiline strings unnecessarily wrapped in optional parentheses
Łukasz Langa [Thu, 17 May 2018 02:19:48 +0000 (19:19 -0700)]
Fix multiline strings unnecessarily wrapped in optional parentheses

Fixes #215

6 years agoExplain automatic parentheses management better
Łukasz Langa [Wed, 16 May 2018 22:26:36 +0000 (15:26 -0700)]
Explain automatic parentheses management better

6 years agoImplement fluent interfaces
Łukasz Langa [Wed, 16 May 2018 22:09:02 +0000 (15:09 -0700)]
Implement fluent interfaces

Fixes #67

6 years agoConsider `in`, `not in`, `is`, `is not` operators
Łukasz Langa [Wed, 16 May 2018 21:31:37 +0000 (14:31 -0700)]
Consider `in`, `not in`, `is`, `is not` operators

6 years agoFor omitting optional parentheses, ignore delimiters of lower priorities
Łukasz Langa [Wed, 16 May 2018 21:40:23 +0000 (14:40 -0700)]
For omitting optional parentheses, ignore delimiters of lower priorities

6 years agoReport progress on multiple files incrementally
Łukasz Langa [Wed, 16 May 2018 18:45:32 +0000 (11:45 -0700)]
Report progress on multiple files incrementally

6 years agoLink fix to issue
Łukasz Langa [Wed, 16 May 2018 05:15:28 +0000 (22:15 -0700)]
Link fix to issue

6 years agoDon't use optional parentheses in unnecessary situations
Ł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

6 years agoSimplify `is_trivial_*` methods
Łukasz Langa [Tue, 15 May 2018 20:25:00 +0000 (13:25 -0700)]
Simplify `is_trivial_*` methods

6 years agoDocument .pyi formatting
Łukasz Langa [Tue, 15 May 2018 20:05:19 +0000 (13:05 -0700)]
Document .pyi formatting

6 years agoWarn that `right_hand_split()` modifies `bracket_depth` in leaves
Łukasz Langa [Tue, 15 May 2018 19:18:28 +0000 (12:18 -0700)]
Warn that `right_hand_split()` modifies `bracket_depth` in leaves

6 years agoAdd support for pyi files (#210)
Jelle Zijlstra [Tue, 15 May 2018 19:09:35 +0000 (15:09 -0400)]
Add support for pyi files (#210)

Fixes #207

6 years agoacks += miggaiowski
Łukasz Langa [Tue, 15 May 2018 08:08:51 +0000 (01:08 -0700)]
acks += miggaiowski

6 years agoDon't explode trailers that fit in a single line
Łukasz Langa [Mon, 14 May 2018 19:05:39 +0000 (12:05 -0700)]
Don't explode trailers that fit in a single line

6 years agoRe-use indexes of current iteration in `comments_after()`
Łukasz Langa [Mon, 14 May 2018 18:17:56 +0000 (11:17 -0700)]
Re-use indexes of current iteration in `comments_after()`

6 years agoacks += JelleZijlstra
Łukasz Langa [Thu, 10 May 2018 04:40:51 +0000 (21:40 -0700)]
acks += JelleZijlstra

6 years agoTravis workaround script no longer necessary
Łukasz Langa [Wed, 9 May 2018 23:05:12 +0000 (16:05 -0700)]
Travis workaround script no longer necessary

6 years agoCheck for broken symlinks before checking file data (#202)
Miguel Gaiowski [Tue, 15 May 2018 05:13:48 +0000 (22:13 -0700)]
Check for broken symlinks before checking file data (#202)

6 years agofix a spelling typo (#206)
jose nazario [Sat, 12 May 2018 17:44:30 +0000 (13:44 -0400)]
fix a spelling typo (#206)

6 years agoUpdate Travis to use the default 3.7-dev binary
Łukasz Langa [Wed, 9 May 2018 22:56:44 +0000 (15:56 -0700)]
Update Travis to use the default 3.7-dev binary

6 years agoDocument string prefix standardization
Łukasz Langa [Wed, 9 May 2018 22:45:38 +0000 (15:45 -0700)]
Document string prefix standardization

6 years agoAdding Jupyter Notebook magic command (#200)
Vishwas B Sharma [Wed, 9 May 2018 22:26:56 +0000 (03:56 +0530)]
Adding Jupyter Notebook magic command (#200)

6 years agoRemove u prefix if unicode_literals is present (#199)
Jelle Zijlstra [Wed, 9 May 2018 22:26:41 +0000 (15:26 -0700)]
Remove u prefix if unicode_literals is present (#199)

6 years agoShow badge for stable docs, not latest
Łukasz Langa [Wed, 9 May 2018 07:01:20 +0000 (00:01 -0700)]
Show badge for stable docs, not latest

6 years agoDon't make parentheses invisible around yield expressions
Łukasz Langa [Wed, 9 May 2018 06:31:41 +0000 (23:31 -0700)]
Don't make parentheses invisible around yield expressions

6 years agoFix docstring of is_vararg
Łukasz Langa [Wed, 9 May 2018 06:03:59 +0000 (23:03 -0700)]
Fix docstring of is_vararg

6 years agoClarify language in README
Łukasz Langa [Wed, 9 May 2018 04:08:07 +0000 (21:08 -0700)]
Clarify language in README

6 years agoAutomatic management of parentheses in `elif`, too
Łukasz Langa [Wed, 9 May 2018 04:01:50 +0000 (21:01 -0700)]
Automatic management of parentheses in `elif`, too

6 years agoSupport nested lambdas in BracketTracker
Łukasz Langa [Wed, 9 May 2018 03:59:18 +0000 (20:59 -0700)]
Support nested lambdas in BracketTracker

6 years agoAutomatic management of parentheses in assignments
Ł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.

6 years agoFix docstrings of visit_stmt and normalize_invisible_parens
Łukasz Langa [Tue, 8 May 2018 23:42:41 +0000 (16:42 -0700)]
Fix docstrings of visit_stmt and normalize_invisible_parens

6 years agoDelimit multiline expressions according to math operator priority
Łukasz Langa [Tue, 8 May 2018 23:20:27 +0000 (16:20 -0700)]
Delimit multiline expressions according to math operator priority

Fixes #148

6 years agoDiscover whether a file is Python 3.6+ also by stars in calls
Ł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.

6 years agoAddresses #174 Neovim Error (#197)
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`.

6 years agoUpgrade dependencies
Łukasz Langa [Tue, 8 May 2018 01:44:18 +0000 (18:44 -0700)]
Upgrade dependencies

6 years agoDon't fail the entire right_hand_split if an optional split failed
Ł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.

6 years agoDiff version
Łukasz Langa [Mon, 7 May 2018 18:36:51 +0000 (11:36 -0700)]
Diff version

6 years agoMake parentheses invisible recursively in atoms
Ł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

6 years agoDon't leave invalid trailing comma on imports
Łukasz Langa [Mon, 7 May 2018 17:34:30 +0000 (10:34 -0700)]
Don't leave invalid trailing comma on imports

Fixes #185

6 years agoUpdate README (change log; acks += skapil; acks += tiran)
Łukasz Langa [Mon, 7 May 2018 17:29:37 +0000 (10:29 -0700)]
Update README (change log; acks += skapil; acks += tiran)

6 years agoFormatting nits
Łukasz Langa [Mon, 7 May 2018 17:22:43 +0000 (10:22 -0700)]
Formatting nits

6 years agoRemoving empty parentheses after class name (#180)
snlkapil [Mon, 7 May 2018 17:15:24 +0000 (10:15 -0700)]
Removing empty parentheses after class name (#180)

6 years agoOutput something when no files are reformatted (#190)
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>