]> 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 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>
6 years agoAdd more files/directories to .gitignore (#191)
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>
6 years agoMore detailed isort configuration explanation
Łukasz Langa [Thu, 3 May 2018 07:48:37 +0000 (00:48 -0700)]
More detailed isort configuration explanation

6 years agoRemove unnecessary shebang lines (#189)
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>
6 years agoShould this be "_cede_ control" (#187)
David Szotten [Thu, 3 May 2018 03:25:23 +0000 (04:25 +0100)]
Should this be  "_cede_ control" (#187)

6 years agoFormat subscriptions in a PEP-8 compliant way (#178)
Zsolt Dollenstein [Tue, 1 May 2018 05:49:30 +0000 (22:49 -0700)]
Format subscriptions in a PEP-8 compliant way (#178)

Fixes #157

6 years agofix type errors in setup.py (#179)
Zsolt Dollenstein [Sun, 29 Apr 2018 07:50:08 +0000 (00:50 -0700)]
fix type errors in setup.py (#179)

6 years ago.gititnore += .vscode
Łukasz Langa [Sat, 28 Apr 2018 20:47:59 +0000 (13:47 -0700)]
.gititnore += .vscode

6 years ago18.4a4 hotfix: don't populate the cache on --check
Ł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

6 years agoReword inspiration
Łukasz Langa [Fri, 27 Apr 2018 00:10:40 +0000 (17:10 -0700)]
Reword inspiration

Fixes #167

6 years agoAdd `explode_split` to documentation
Łukasz Langa [Tue, 24 Apr 2018 21:27:21 +0000 (14:27 -0700)]
Add `explode_split` to documentation

6 years ago18.4a3
Łukasz Langa [Tue, 24 Apr 2018 20:52:12 +0000 (13:52 -0700)]
18.4a3

6 years agoSplit imports like isort
Łukasz Langa [Tue, 24 Apr 2018 20:44:28 +0000 (13:44 -0700)]
Split imports like isort

Fixes #127

Partially addresses #152

6 years agoDo not enforce empty lines after control flow statements
Łukasz Langa [Tue, 24 Apr 2018 19:40:46 +0000 (12:40 -0700)]
Do not enforce empty lines after control flow statements

Fixes #90

6 years agoSplit ternary expressions
Łukasz Langa [Tue, 24 Apr 2018 19:19:56 +0000 (12:19 -0700)]
Split ternary expressions

Fixes #141

6 years agoMake cache work with non-default line lenghts (#163)
Jonas Obrist [Tue, 24 Apr 2018 18:56:50 +0000 (03:56 +0900)]
Make cache work with non-default line lenghts (#163)

6 years agoSupport sticky standalone comments (comments preceding defs, classes, and decorators)
Ł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

6 years ago[#154] Handle comments between decorators properly (#166)
Vishwas B Sharma [Tue, 24 Apr 2018 16:38:12 +0000 (09:38 -0700)]
[#154] Handle comments between decorators properly (#166)

6 years agoAdd install instructions for Vim plugin (#131)
Josh Holland [Tue, 24 Apr 2018 16:36:28 +0000 (17:36 +0100)]
Add install instructions for Vim plugin (#131)

6 years agoImprove change log message
Łukasz Langa [Mon, 23 Apr 2018 22:58:16 +0000 (15:58 -0700)]
Improve change log message

6 years agoAllow standalone comments to close code blocks
Łukasz Langa [Mon, 23 Apr 2018 22:55:32 +0000 (15:55 -0700)]
Allow standalone comments to close code blocks

Fixes #16
Fixes #32

6 years agoAccelerate Unicode identifier support (backport from Lib/tokenize.py)
Łukasz Langa [Mon, 23 Apr 2018 21:31:35 +0000 (14:31 -0700)]
Accelerate Unicode identifier support (backport from Lib/tokenize.py)

6 years agoRemove nonsensical grammar from blib2to3
Łukasz Langa [Mon, 23 Apr 2018 21:24:14 +0000 (14:24 -0700)]
Remove nonsensical grammar from blib2to3

6 years agoPut the PSF license in blib2to3/ to mark that code. (#162)
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.

6 years agoShow full path on diffs
Łukasz Langa [Mon, 23 Apr 2018 19:00:03 +0000 (12:00 -0700)]
Show full path on diffs

Fixes #130

6 years agoacks += csurfer
Łukasz Langa [Mon, 23 Apr 2018 18:48:58 +0000 (11:48 -0700)]
acks += csurfer

6 years agoRefactor `reformat_one` and `schedule_formatting` to decrease state
Łukasz Langa [Mon, 23 Apr 2018 18:48:01 +0000 (11:48 -0700)]
Refactor `reformat_one` and `schedule_formatting` to decrease state

6 years agoFix tests on windows (#159)
Zsolt Dollenstein [Mon, 23 Apr 2018 18:23:36 +0000 (19:23 +0100)]
Fix tests on windows (#159)

6 years ago[#149] Make check and diff not mutually exclusive (#161)
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.

6 years agoAdd AppVeyor for Windows builds
Łukasz Langa [Sat, 21 Apr 2018 22:32:01 +0000 (15:32 -0700)]
Add AppVeyor for Windows builds

6 years agoMove delimiter token skipping to BracketTracker
Ł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

6 years agoSkip handling signals on event loops that don't support it (#156)
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)

6 years agofixed cache file location in readme (#150)
Jonas Obrist [Sat, 21 Apr 2018 19:15:13 +0000 (04:15 +0900)]
fixed cache file location in readme (#150)

6 years agoRemove dead code
Łukasz Langa [Thu, 19 Apr 2018 05:43:23 +0000 (22:43 -0700)]
Remove dead code

6 years agoPrint exact Python version with build date
Łukasz Langa [Thu, 19 Apr 2018 05:29:01 +0000 (22:29 -0700)]
Print exact Python version with build date

6 years agoacks += ojii
Łukasz Langa [Thu, 19 Apr 2018 05:17:18 +0000 (22:17 -0700)]
acks += ojii

6 years agoStore pickles for 3.8.0a0
Łukasz Langa [Thu, 19 Apr 2018 05:17:00 +0000 (22:17 -0700)]
Store pickles for 3.8.0a0

6 years agoSolve the Travis failure with 3.7 from deadsnakes
Łukasz Langa [Thu, 19 Apr 2018 02:36:39 +0000 (19:36 -0700)]
Solve the Travis failure with 3.7 from deadsnakes

6 years agoUpdate documentation
Ł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

6 years agoDocstring for `max_delimiter_priority_in_atom()`
Łukasz Langa [Thu, 19 Apr 2018 01:13:36 +0000 (18:13 -0700)]
Docstring for `max_delimiter_priority_in_atom()`

6 years agoSimplify single-file vs. multi-file modes
Łukasz Langa [Thu, 19 Apr 2018 00:59:28 +0000 (17:59 -0700)]
Simplify single-file vs. multi-file modes

6 years agoRevert `format_file_in_place()` and `format_stdin_to_stdout()` to return bools
Ł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.

6 years agoUpdate 3.6.4 grammar pickle
Łukasz Langa [Thu, 19 Apr 2018 00:41:49 +0000 (17:41 -0700)]
Update 3.6.4 grammar pickle

6 years agoAdded caching (#136)
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.

6 years agoadd sublack plugin for sublimetext (#137)
jgirardet [Tue, 17 Apr 2018 20:24:29 +0000 (22:24 +0200)]
add sublack plugin for sublimetext (#137)

6 years agoMerge pull request #138 from ambv/star-expr
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 **

6 years agoAdd changelog entry
Zsolt Dollenstein [Tue, 17 Apr 2018 19:46:40 +0000 (20:46 +0100)]
Add changelog entry

6 years agouse STARS instead of STAR | DOUBLESTAR
Zsolt Dollenstein [Tue, 17 Apr 2018 19:28:25 +0000 (20:28 +0100)]
use STARS instead of STAR | DOUBLESTAR

6 years agoParse complex expressions in parameters after * and **
Zsolt Dollenstein [Tue, 17 Apr 2018 08:04:35 +0000 (09:04 +0100)]
Parse complex expressions in parameters after * and **

6 years agoGeneralize star expression handling
Łukasz Langa [Mon, 16 Apr 2018 08:32:09 +0000 (01:32 -0700)]
Generalize star expression handling

Fixes #132

6 years ago18.4a2
Łukasz Langa [Fri, 13 Apr 2018 19:06:40 +0000 (12:06 -0700)]
18.4a2

6 years agoHandle unnecessarily escaped strings (#128)
Zsolt Dollenstein [Fri, 13 Apr 2018 18:31:23 +0000 (19:31 +0100)]
Handle unnecessarily escaped strings (#128)

6 years agoOpen temporary files with utf-8 encoding (#126)
Zsolt Dollenstein [Thu, 12 Apr 2018 18:19:21 +0000 (19:19 +0100)]
Open temporary files with utf-8 encoding (#126)

This is not the default on Windows.

6 years agoConsistent empty lines in Change Log
Łukasz Langa [Thu, 12 Apr 2018 06:36:50 +0000 (23:36 -0700)]
Consistent empty lines in Change Log

6 years agoAdvertise Windows support in Vim plugin
Łukasz Langa [Thu, 12 Apr 2018 06:29:57 +0000 (23:29 -0700)]
Advertise Windows support in Vim plugin

6 years agoMake Vim plugin work on macOS/Linux again
Łukasz Langa [Thu, 12 Apr 2018 06:29:00 +0000 (23:29 -0700)]
Make Vim plugin work on macOS/Linux again

6 years agoFix placement of dictionary unpacking inside dict literals
Łukasz Langa [Thu, 12 Apr 2018 06:19:03 +0000 (23:19 -0700)]
Fix placement of dictionary unpacking inside dict literals

Fixes #111

6 years agoRemove debug print
Łukasz Langa [Thu, 12 Apr 2018 06:09:07 +0000 (23:09 -0700)]
Remove debug print

6 years agoFix parsing of unaligned standalone comments
Łukasz Langa [Thu, 12 Apr 2018 06:07:56 +0000 (23:07 -0700)]
Fix parsing of unaligned standalone comments

Fixes #99
Fixes #112

6 years agoAdd windows support for black vim plugin (#123)
Zsolt Dollenstein [Thu, 12 Apr 2018 02:55:47 +0000 (03:55 +0100)]
Add windows support for black vim plugin (#123)

This is mostly a best effort support, and I only tested it on my
machine.

6 years ago18.4a1
Łukasz Langa [Thu, 12 Apr 2018 02:22:16 +0000 (19:22 -0700)]
18.4a1

6 years agoDon't omit escaping the second consecutive quote
Łukasz Langa [Wed, 11 Apr 2018 23:25:47 +0000 (16:25 -0700)]
Don't omit escaping the second consecutive quote

This would produce invalid code for strings like `"x = ''; y = \"\""`.

6 years agoFix an embarrassing UnboundLocalError
Łukasz Langa [Wed, 11 Apr 2018 22:49:14 +0000 (15:49 -0700)]
Fix an embarrassing UnboundLocalError

6 years agoAutomatic parentheses management
Łukasz Langa [Thu, 5 Apr 2018 04:45:01 +0000 (21:45 -0700)]
Automatic parentheses management

Fixes #4

6 years agoteam += zsol
Łukasz Langa [Mon, 9 Apr 2018 22:09:45 +0000 (15:09 -0700)]
team += zsol

6 years agoConsole formatting nits
Łukasz Langa [Mon, 9 Apr 2018 22:09:22 +0000 (15:09 -0700)]
Console formatting nits

6 years agoAdd support for all valid string literals (#115)
Zsolt Dollenstein [Mon, 9 Apr 2018 21:36:40 +0000 (22:36 +0100)]
Add support for all valid string literals (#115)

6 years agoREADME: Add instructions for PyCharm (#81)
Steven M. Vascellaro [Mon, 9 Apr 2018 19:00:37 +0000 (15:00 -0400)]
README: Add instructions for PyCharm (#81)

Instructions to add `black` to "External Tools" in PyCharm.

Adapted from https://kirankoduru.github.io/python/pylint-with-pycharm.html

6 years agoDocument that W503 is not compliant with PEP 8 (#114)
Mika⠙ [Fri, 6 Apr 2018 15:02:11 +0000 (17:02 +0200)]
Document that W503 is not compliant with PEP 8 (#114)

6 years agoteam += autophagy
Łukasz Langa [Thu, 5 Apr 2018 21:27:27 +0000 (14:27 -0700)]
team += autophagy

6 years agoLink VCS integration in documentation
Łukasz Langa [Thu, 5 Apr 2018 09:21:26 +0000 (02:21 -0700)]
Link VCS integration in documentation

6 years ago[blib2to3] Support non-ASCII identifiers
Łukasz Langa [Thu, 5 Apr 2018 04:38:25 +0000 (21:38 -0700)]
[blib2to3] Support non-ASCII identifiers

This support isn't *exactly* right per PEP 3131 as the regex engine is a bit
too limited for that and I didn't want to spend time on Other_ID_Start and
Other_ID_Continue unless they're actually needed.

Hopefully this doesn't slow it down too much.

6 years agoHandle arbitrary number of backslashes during string normalization (#110)
Zsolt Dollenstein [Thu, 5 Apr 2018 09:28:46 +0000 (10:28 +0100)]
Handle arbitrary number of backslashes during string normalization (#110)

6 years agoSimplify delimiter logic
Łukasz Langa [Wed, 4 Apr 2018 23:33:10 +0000 (16:33 -0700)]
Simplify delimiter logic

6 years agoacks += asottile
Łukasz Langa [Wed, 4 Apr 2018 22:11:48 +0000 (15:11 -0700)]
acks += asottile

6 years agoUpdate change log
Łukasz Langa [Wed, 4 Apr 2018 22:09:05 +0000 (15:09 -0700)]
Update change log

6 years agoUpdate `language-version` => `language_version` (#106)
Anthony Sottile [Wed, 4 Apr 2018 22:09:34 +0000 (15:09 -0700)]
Update `language-version` => `language_version` (#106)

6 years agoAdd a description for the pre-commit hook (#107)
Anthony Sottile [Wed, 4 Apr 2018 22:07:57 +0000 (15:07 -0700)]
Add a description for the pre-commit hook (#107)

This string appears on the hooks page on pre-commit.com.

6 years agoHandle backslashes in raw strings while normalizing (#105)
Zsolt Dollenstein [Wed, 4 Apr 2018 20:20:46 +0000 (21:20 +0100)]
Handle backslashes in raw strings while normalizing (#105)

In raw strings, a single backslash means a literal backslash. It is also used to escape quotes if it precedes them. This means it is impossible to change the quote type for strings that contain an unescaped version of the other quote type.
Fixes #100

6 years agoAdd integration for pre-commit.com (#104)
Łukasz Langa [Wed, 4 Apr 2018 20:19:30 +0000 (13:19 -0700)]
Add integration for pre-commit.com (#104)

Fixes #103

6 years agoacks += ikatanic
Łukasz Langa [Wed, 4 Apr 2018 16:57:12 +0000 (09:57 -0700)]
acks += ikatanic

6 years ago3.6.5 grammar pickles
Łukasz Langa [Tue, 3 Apr 2018 21:53:31 +0000 (14:53 -0700)]
3.6.5 grammar pickles

6 years agoFix --check for multiple files (#101)
Ivan Katanić [Wed, 4 Apr 2018 16:53:34 +0000 (17:53 +0100)]
Fix --check for multiple files (#101)

6 years agoAdd --quiet
Łukasz Langa [Tue, 3 Apr 2018 06:15:57 +0000 (23:15 -0700)]
Add --quiet

Fixes #78

6 years ago[blib2to3] Make the grammar pickles faster
Łukasz Langa [Tue, 3 Apr 2018 01:28:24 +0000 (18:28 -0700)]
[blib2to3] Make the grammar pickles faster

6 years ago18.4a0
Łukasz Langa [Sun, 1 Apr 2018 07:30:45 +0000 (00:30 -0700)]
18.4a0

6 years agoacks += zsol
Łukasz Langa [Sun, 1 Apr 2018 07:14:30 +0000 (00:14 -0700)]
acks += zsol

6 years agoIgnore `# fmt: off` as inline comment
Łukasz Langa [Sun, 1 Apr 2018 06:50:27 +0000 (23:50 -0700)]
Ignore `# fmt: off` as inline comment

Black cannot currently support this form due to its generator-based nature.
This is mostly a problem for existing `# yapf: disable` usage as trailing
comment.

Fixes #95

6 years agoDon't insert trailing commas after standalone comments
Łukasz Langa [Sun, 1 Apr 2018 06:32:11 +0000 (23:32 -0700)]
Don't insert trailing commas after standalone comments

6 years agoClarify why Black prefers double quotes
Łukasz Langa [Sun, 1 Apr 2018 03:54:26 +0000 (20:54 -0700)]
Clarify why Black prefers double quotes

6 years agoImprove test coverage a bit
Łukasz Langa [Sat, 31 Mar 2018 22:45:55 +0000 (15:45 -0700)]
Improve test coverage a bit

6 years agoSupport --diff for both files and stdin
Łukasz Langa [Sat, 31 Mar 2018 09:24:01 +0000 (02:24 -0700)]
Support --diff for both files and stdin

Fixes #87

6 years agoDescribe how string literals are handled (#96)
Zsolt Dollenstein [Sat, 31 Mar 2018 21:42:48 +0000 (22:42 +0100)]
Describe how string literals are handled (#96)

6 years agoLines now break before all delimiters (#94)
Mika⠙ [Sat, 31 Mar 2018 18:52:11 +0000 (20:52 +0200)]
Lines now break before all delimiters (#94)

The default behaviour is that now all lines break *before* delimiters,
instead of afterwards. The special cases for this are commas and
behaviour around args.

Resolves #73