]> 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
5 years agoMake sure `async for` is not broken up to separate lines (#503)
Zsolt Dollenstein [Sat, 8 Sep 2018 09:34:08 +0000 (10:34 +0100)]
Make sure `async for` is not broken up to separate lines (#503)

Fixes #372.

5 years agoAdd trove classifier for Python 3.7 support (#486)
Jon Dufresne [Tue, 28 Aug 2018 12:00:57 +0000 (05:00 -0700)]
Add trove classifier for Python 3.7 support (#486)

Testing added in 3bdd42389128bbbe8b64a8e050563f09bff99979.

5 years agoPrefer https:// links where available (#485)
Jon Dufresne [Tue, 28 Aug 2018 12:00:05 +0000 (05:00 -0700)]
Prefer https:// links where available (#485)

5 years agoAdd build & dist directories to .gitignore (#487)
Jon Dufresne [Tue, 28 Aug 2018 11:59:00 +0000 (04:59 -0700)]
Add build & dist directories to .gitignore (#487)

Generated when running the command "python3 setup.py bdist_wheel".

5 years agoInclude license file in the generated wheel package (#484)
Jon Dufresne [Tue, 28 Aug 2018 11:58:21 +0000 (04:58 -0700)]
Include license file in the generated wheel package (#484)

The wheel package format supports including the license file. This is
done using the [metadata] section in the setup.cfg file. For additional
information on this feature, see:

https://wheel.readthedocs.io/en/stable/index.html#including-the-license-in-the-generated-wheel-file

Helps project comply with its own license:

> The above copyright notice and this permission notice shall be
> included in all copies or substantial portions of the Software.

5 years agoUpdate pypi.python.org URL to pypi.org (#488)
Jon Dufresne [Tue, 28 Aug 2018 11:52:32 +0000 (04:52 -0700)]
Update pypi.python.org URL to pypi.org (#488)

For details on the new PyPI, see the blog post:

https://pythoninsider.blogspot.ca/2018/04/new-pypi-launched-legacy-pypi-shutting.html

5 years agoChange my email in the README (#483)
Eli Treuherz [Tue, 28 Aug 2018 08:56:55 +0000 (09:56 +0100)]
Change my email in the README (#483)

Would prefer my personal email here. I realise it's still in the git log but c'est la vie.

5 years agoISSUE_TEMPLATE.md: Add mention of online formatter (#481)
Nikolaus Waxweiler [Mon, 27 Aug 2018 09:10:45 +0000 (10:10 +0100)]
ISSUE_TEMPLATE.md: Add mention of online formatter (#481)

People can try out https://black.now.sh/?version=master to test against master. That should make issue reporting easier.

See https://github.com/jpadilla/black-playground/issues/6#issuecomment-416088863. Thanks @jpadilla!

5 years agofix lint errors
Zsolt Dollenstein [Sun, 26 Aug 2018 20:27:33 +0000 (21:27 +0100)]
fix lint errors

5 years agoadd test case for preserving newlines from stdin
Zsolt Dollenstein [Sun, 26 Aug 2018 20:19:22 +0000 (21:19 +0100)]
add test case for preserving newlines from stdin

5 years agochange some numeric behavior (#469)
Jelle Zijlstra [Thu, 23 Aug 2018 18:55:29 +0000 (11:55 -0700)]
change some numeric behavior (#469)

5 years agoadd changelog entry for #468
Zsolt Dollenstein [Thu, 23 Aug 2018 11:55:04 +0000 (12:55 +0100)]
add changelog entry for #468

5 years agofix bracket match bug (#470)
Jelle Zijlstra [Thu, 23 Aug 2018 11:52:07 +0000 (04:52 -0700)]
fix bracket match bug (#470)

* fix bracket match bug

* add missing test file

5 years agowrap atoms in invisible parens to split adjacent strings (#463)
Jelle Zijlstra [Wed, 22 Aug 2018 04:10:59 +0000 (21:10 -0700)]
wrap atoms in invisible parens to split adjacent strings (#463)

5 years agofix misformatting of floats with leading zeros (#464)
Jelle Zijlstra [Mon, 20 Aug 2018 15:19:25 +0000 (08:19 -0700)]
fix misformatting of floats with leading zeros (#464)

5 years agoSupport parsing of async generators in non-async functions (#165)
Zsolt Dollenstein [Mon, 20 Aug 2018 13:47:58 +0000 (14:47 +0100)]
Support parsing of async generators in non-async functions (#165)

This is a new syntax added in python3.7, so black can't verify that reformatting will not change the ast unless black itself is run with 3.7. We'll need to change the error message black gives in this case. @ambv any ideas?

Fixes #125.

5 years agoautodetect Python 3.6 on the basis of underscores (#461)
Jelle Zijlstra [Mon, 20 Aug 2018 04:02:06 +0000 (21:02 -0700)]
autodetect Python 3.6 on the basis of underscores (#461)

5 years agoFix minor typos (#443)
ceh [Sun, 19 Aug 2018 12:10:06 +0000 (14:10 +0200)]
Fix minor typos (#443)

5 years agocommitters += jelle
Łukasz Langa [Sat, 18 Aug 2018 21:01:57 +0000 (14:01 -0700)]
committers += jelle

5 years agoPyPI downloads badge
Łukasz Langa [Fri, 17 Aug 2018 17:59:32 +0000 (10:59 -0700)]
PyPI downloads badge

5 years agoNits around numeral normalization.
Łukasz Langa [Fri, 17 Aug 2018 17:38:28 +0000 (10:38 -0700)]
Nits around numeral normalization.

5 years agoPut missing blank lines after return statements.
Łukasz Langa [Fri, 17 Aug 2018 17:29:19 +0000 (10:29 -0700)]
Put missing blank lines after return statements.

5 years agoMake schedule_formatting logic less nested.
Łukasz Langa [Fri, 17 Aug 2018 17:17:37 +0000 (10:17 -0700)]
Make schedule_formatting logic less nested.

5 years agoSimplify caching logic.
Łukasz Langa [Fri, 17 Aug 2018 17:14:10 +0000 (10:14 -0700)]
Simplify caching logic.

5 years agoUpdate README with missing change log, etc.
Łukasz Langa [Fri, 17 Aug 2018 17:11:01 +0000 (10:11 -0700)]
Update README with missing change log, etc.

5 years agonot enforcing python3.6 for precommit hook (#430)
Miroslav Shubernetskiy [Fri, 17 Aug 2018 16:01:29 +0000 (12:01 -0400)]
not enforcing python3.6 for precommit hook (#430)

this should allow precommit hooks to be used with py37

5 years agoRemove mappings from Vim plugin. (#417)
David Hotham [Fri, 17 Aug 2018 15:45:47 +0000 (16:45 +0100)]
Remove mappings from Vim plugin. (#417)

They clashed with standard mappings.  Simplest just to let users define
their own.

Fixes #415

5 years agoadded instructions for PyCharm File Watcher setup (#418)
Benjamin Wohlwend [Fri, 17 Aug 2018 15:44:55 +0000 (17:44 +0200)]
added instructions for PyCharm File Watcher setup (#418)

* added instructions for PyCharm File Watcher setup

With these steps, PyCharm will run black on every file save.

* Update README.md

5 years agovim: Restore cursor/window position after format (#433)
Jonty Wareing [Fri, 17 Aug 2018 15:39:34 +0000 (16:39 +0100)]
vim: Restore cursor/window position after format (#433)

Without this the cursor jumps to the top of the window after formatting
occurs.

5 years agoAdd playground link (#437)
José Padilla [Fri, 17 Aug 2018 15:36:57 +0000 (11:36 -0400)]
Add playground link (#437)

5 years agoUse atom-black plugin for Atom integration (#456)
hauntsaninja [Fri, 17 Aug 2018 15:25:47 +0000 (08:25 -0700)]
Use atom-black plugin for Atom integration (#456)

5 years agowrite cache in --check mode (#453)
Jelle Zijlstra [Fri, 17 Aug 2018 14:40:37 +0000 (07:40 -0700)]
write cache in --check mode (#453)

Fixes #448.

This diff makes us always write to the cache in normal mode, except
if the file is already in the cache, and it makes us write to the
cache in --check mode if the file is already well formatted.

I also fixed some related docstrings.

WriteBack.NO is now used only in tests.

5 years agonormalize numeric literals (#454)
Jelle Zijlstra [Fri, 17 Aug 2018 14:03:58 +0000 (07:03 -0700)]
normalize numeric literals (#454)

Fixes #452

I ended up making a couple of other normalizations to numeric literals
too (lowercase everything, don't allow leading or trailing . in floats,
remove redundant + sign in exponent). I don't care too much about those,
so I'm happy to change the behavior there.

For reference, here is Python's grammar for numeric literals:
https://docs.python.org/3/reference/lexical_analysis.html#numeric-literals

5 years agoLook at actual parenthesis when generating ignored leafs.
Zsolt Dollenstein [Sun, 22 Jul 2018 13:47:42 +0000 (14:47 +0100)]
Look at actual parenthesis when generating ignored leafs.

Fixes #385

5 years agoupdate to mypy 0.620 and make tests pass again
Zsolt Dollenstein [Wed, 18 Jul 2018 21:07:54 +0000 (22:07 +0100)]
update to mypy 0.620 and make tests pass again

Fixes #408

5 years agopre-commit: use exclusion instead of ever-growing regex (#382)
Anthony Sottile [Mon, 9 Jul 2018 20:42:38 +0000 (13:42 -0700)]
pre-commit: use exclusion instead of ever-growing regex (#382)

5 years agoadd change log entry
Zsolt Dollenstein [Mon, 2 Jul 2018 17:02:13 +0000 (18:02 +0100)]
add change log entry

5 years agoImprove get_future_imports implementation.
Zsolt Dollenstein [Mon, 2 Jul 2018 16:48:48 +0000 (17:48 +0100)]
Improve get_future_imports implementation.

Closes #389.

5 years agoTravisCI: Test on production Python 3.7 and 3.8-dev (#393)
cclauss [Mon, 2 Jul 2018 16:05:40 +0000 (18:05 +0200)]
TravisCI: Test on production Python 3.7 and 3.8-dev (#393)

5 years agoSuggest BufWritePre instead of BufWritePost for vi (#376)
David Szotten [Sat, 23 Jun 2018 07:56:05 +0000 (08:56 +0100)]
Suggest BufWritePre instead of BufWritePost for vi (#376)

closes #321

5 years ago18.6b4
Łukasz Langa [Thu, 21 Jun 2018 21:25:07 +0000 (14:25 -0700)]
18.6b4

5 years agoDon't freeze when multiple comments directly precede # fmt: off
Łukasz Langa [Thu, 21 Jun 2018 20:29:34 +0000 (13:29 -0700)]
Don't freeze when multiple comments directly precede # fmt: off

Fixes #371

5 years ago18.6b3
Łukasz Langa [Wed, 20 Jun 2018 19:00:07 +0000 (12:00 -0700)]
18.6b3

5 years agoMore tests for `# fmt: off`
Łukasz Langa [Wed, 20 Jun 2018 06:46:58 +0000 (23:46 -0700)]
More tests for `# fmt: off`

Two more known limitations that I don't feel like solving now.  Probably very
low priority.

5 years agoTrivial nits
Łukasz Langa [Wed, 20 Jun 2018 06:08:10 +0000 (23:08 -0700)]
Trivial nits

5 years agoStop Click from crashing Black on invalid environments
Łukasz Langa [Wed, 20 Jun 2018 05:40:26 +0000 (22:40 -0700)]
Stop Click from crashing Black on invalid environments

Fixes #277

5 years agoMove INDENT value to the postponed prefix
Łukasz Langa [Wed, 20 Jun 2018 03:44:47 +0000 (20:44 -0700)]
Move INDENT value to the postponed prefix

This makes blib2to3's tree output valid again (which was broken by the previous
fiddling with INDENT and DEDENT nodes).

Fixes #334

5 years agoUse the separate pass for `# fmt: off` on all code
Łukasz Langa [Wed, 20 Jun 2018 00:32:41 +0000 (17:32 -0700)]
Use the separate pass for `# fmt: off` on all code

This removes the hacky exception-based handling that didn't work across
statement boundaries.

Fixes #335

5 years agoSupport `# fmt: off/on` pairs within brackets
Łukasz Langa [Tue, 19 Jun 2018 01:14:10 +0000 (18:14 -0700)]
Support `# fmt: off/on` pairs within brackets

Fixes #329

5 years agoUpdate README with missing fixes in Change Log
Łukasz Langa [Mon, 18 Jun 2018 23:18:45 +0000 (16:18 -0700)]
Update README with missing fixes in Change Log

5 years agoCache generated comments
Łukasz Langa [Mon, 18 Jun 2018 23:14:58 +0000 (16:14 -0700)]
Cache generated comments

5 years agoAdd travis badge and GitHub Fork banner to docs (#365)
Mariatta [Tue, 19 Jun 2018 03:12:49 +0000 (20:12 -0700)]
Add travis badge and GitHub Fork banner to docs (#365)

5 years agoAdd pyls-black to README (#361)
Rupert Bedford [Sat, 16 Jun 2018 20:14:51 +0000 (21:14 +0100)]
Add pyls-black to README (#361)

5 years agoAdd blank line after constants in stub file (#360)
Jelle Zijlstra [Sat, 16 Jun 2018 18:53:45 +0000 (11:53 -0700)]
Add blank line after constants in stub file (#360)

Fixes #340

5 years agoAdd code snippet for using black badge in .rst (#356)
Mariatta [Fri, 15 Jun 2018 22:12:16 +0000 (15:12 -0700)]
Add code snippet for using black badge in .rst (#356)

5 years agoHarmonise with other instances (#347)
Katrin Leinweber [Wed, 13 Jun 2018 18:49:47 +0000 (20:49 +0200)]
Harmonise with other instances (#347)

5 years agoIgnore symbolic links pointing outside of the root directory (#339)
Neraste [Wed, 13 Jun 2018 07:07:04 +0000 (09:07 +0200)]
Ignore symbolic links pointing outside of the root directory (#339)

Fixes #338

5 years agoRemove reference to deprecated Visual Studio Code extension (#343)
Joseph Larson [Tue, 12 Jun 2018 20:36:55 +0000 (14:36 -0600)]
Remove reference to deprecated Visual Studio Code extension (#343)

5 years agoExclude profiling data when doing black . in this repo
Zsolt Dollenstein [Sun, 10 Jun 2018 08:51:18 +0000 (09:51 +0100)]
Exclude profiling data when doing black . in this repo

5 years agoFix string normalization eating all backslashes above 3
Zsolt Dollenstein [Sun, 10 Jun 2018 08:39:24 +0000 (09:39 +0100)]
Fix string normalization eating all backslashes above 3

5 years agoAdd failing test data
Łukasz Langa [Sun, 10 Jun 2018 06:27:00 +0000 (23:27 -0700)]
Add failing test data

5 years agoDon't mark subtrees as changed that were already marked.
Łukasz Langa [Sun, 10 Jun 2018 02:49:20 +0000 (19:49 -0700)]
Don't mark subtrees as changed that were already marked.

5 years agoCache child sibling lookups
Łukasz Langa [Sun, 10 Jun 2018 01:50:20 +0000 (18:50 -0700)]
Cache child sibling lookups

Removes catastrophically quadratic behavior on nodes with very many siblings.

5 years agoMake test_black.py work in profilers
Łukasz Langa [Sun, 10 Jun 2018 01:49:39 +0000 (18:49 -0700)]
Make test_black.py work in profilers

5 years agoMake `is_complex_subscript()` ignore list literals
Łukasz Langa [Sat, 9 Jun 2018 22:40:39 +0000 (15:40 -0700)]
Make `is_complex_subscript()` ignore list literals

This fixes catastrophically quadratic behavior on long lists.

5 years agoMove profiling data out of tests/data
Łukasz Langa [Sat, 9 Jun 2018 22:40:00 +0000 (15:40 -0700)]
Move profiling data out of tests/data

5 years agoFix string normalization sometimes producing invalid fstrings (#327)
Zsolt Dollenstein [Sat, 9 Jun 2018 19:30:49 +0000 (21:30 +0200)]
Fix string normalization sometimes producing invalid fstrings (#327)

5 years agoAdd .toml from tests to MANIFEST.in (#325)
Daniel M. Capella [Sat, 9 Jun 2018 05:02:35 +0000 (01:02 -0400)]
Add .toml from tests to MANIFEST.in (#325)

Needed for `test_piping_diff()`.

5 years ago18.6b2
Łukasz Langa [Fri, 8 Jun 2018 19:07:43 +0000 (12:07 -0700)]
18.6b2

5 years agoUpdate README with missing Change Log entries
Łukasz Langa [Fri, 8 Jun 2018 19:05:44 +0000 (12:05 -0700)]
Update README with missing Change Log entries

5 years agoReturn early from comment placement calculation on lines without comments
Łukasz Langa [Fri, 8 Jun 2018 18:59:05 +0000 (11:59 -0700)]
Return early from comment placement calculation on lines without comments

5 years agoAdd `-h` as a shortcut for `--help` (#316)
Loren Carvalho [Fri, 8 Jun 2018 02:43:04 +0000 (21:43 -0500)]
Add `-h` as a shortcut for `--help` (#316)

5 years agofix handling of empty triple quoted strings (#314)
Zsolt Dollenstein [Thu, 7 Jun 2018 18:41:34 +0000 (20:41 +0200)]
fix handling of empty triple quoted strings (#314)

5 years agoDon't crash the Vim plugin
Łukasz Langa [Thu, 7 Jun 2018 18:40:41 +0000 (11:40 -0700)]
Don't crash the Vim plugin

Fixes #312

5 years ago2018 is not the year of Unicode on your desktop
Łukasz Langa [Thu, 7 Jun 2018 18:24:55 +0000 (11:24 -0700)]
2018 is not the year of Unicode on your desktop

5 years agoPreliminary work on Poetry integration
Łukasz Langa [Thu, 7 Jun 2018 07:15:26 +0000 (00:15 -0700)]
Preliminary work on Poetry integration

5 years agoFix link
Łukasz Langa [Thu, 7 Jun 2018 00:29:31 +0000 (17:29 -0700)]
Fix link

5 years agoIt works better when dependencies are installed. Who knew?
Łukasz Langa [Thu, 7 Jun 2018 00:13:51 +0000 (17:13 -0700)]
It works better when dependencies are installed. Who knew?

5 years agoTrim TOC to fit in two lines again
Łukasz Langa [Thu, 7 Jun 2018 00:07:07 +0000 (17:07 -0700)]
Trim TOC to fit in two lines again

5 years agoUse `black .` now that we can
Łukasz Langa [Thu, 7 Jun 2018 00:04:32 +0000 (17:04 -0700)]
Use `black .` now that we can

5 years agoSupport pyproject.toml
Łukasz Langa [Wed, 6 Jun 2018 22:30:02 +0000 (15:30 -0700)]
Support pyproject.toml

Fixes #65

5 years agoMove test data to data
Łukasz Langa [Wed, 6 Jun 2018 22:39:58 +0000 (15:39 -0700)]
Move test data to data

5 years agoFix improper unmodified file caching when `-S` was used
Łukasz Langa [Wed, 6 Jun 2018 18:58:36 +0000 (11:58 -0700)]
Fix improper unmodified file caching when `-S` was used

This will also future-proof the cache to changes to FileMode.

5 years agoUpdate beta link in docs
Łukasz Langa [Wed, 6 Jun 2018 00:40:00 +0000 (17:40 -0700)]
Update beta link in docs

5 years agovim: add "--skip-string-normalization" support (#310)
Matthew Walster [Wed, 6 Jun 2018 22:45:17 +0000 (15:45 -0700)]
vim: add "--skip-string-normalization" support (#310)

Since 18.6b0 was released, there has been a new option to skip string
normalization when Black is called, but it wasn't able to be specified
from within the vim plugin. This commit adds that functionality.

Tested with g:black_skip_string_normalization set to 0 (off) and 1 (on).

5 years agoDon't put a space after `*` in `g = 1, *"x"` (#309)
Zsolt Dollenstein [Wed, 6 Jun 2018 22:44:12 +0000 (00:44 +0200)]
Don't put a space after `*` in `g = 1, *"x"` (#309)

Fixes #305.

5 years agoChange tests with stdin/out to exercise black.main (#307)
Zsolt Dollenstein [Wed, 6 Jun 2018 22:42:50 +0000 (00:42 +0200)]
Change tests with stdin/out to exercise black.main (#307)

5 years agoList the Python extension for VS Code as an editor integration (#308)
Brett Cannon [Wed, 6 Jun 2018 22:40:44 +0000 (15:40 -0700)]
List the Python extension for VS Code as an editor integration (#308)

5 years agoLink to GitHub + HTTPS + typos (#303)
Hugo [Wed, 6 Jun 2018 16:50:08 +0000 (19:50 +0300)]
Link to GitHub + HTTPS + typos (#303)

* Link to GitHub, update 3.6 minor version

* http -> https

* Fix typos

* The Black style for Black, the project, is italics

5 years agocorrect email for Peter Bengtsson (#302)
Peter Bengtsson [Wed, 6 Jun 2018 00:48:53 +0000 (20:48 -0400)]
correct email for Peter Bengtsson (#302)

5 years agoacks += beterbe
Łukasz Langa [Tue, 5 Jun 2018 17:10:15 +0000 (10:10 -0700)]
acks += beterbe

5 years ago18.6b1
Łukasz Langa [Tue, 5 Jun 2018 16:49:06 +0000 (09:49 -0700)]
18.6b1

5 years ago✨ 🍰 ✨ isn't appropriate when it fails, fixes #300 (#301)
Peter Bengtsson [Tue, 5 Jun 2018 16:35:35 +0000 (12:35 -0400)]
✨ 🍰 ✨ isn't appropriate when it fails, fixes #300 (#301)

5 years agoPrint report on stderr.\n\nFixes #299.
Zsolt Dollenstein [Tue, 5 Jun 2018 09:38:20 +0000 (10:38 +0100)]
Print report on stderr.\n\nFixes #299.

5 years ago18.6b0
Łukasz Langa [Tue, 5 Jun 2018 04:29:09 +0000 (21:29 -0700)]
18.6b0

Fixes #289

5 years agoFix unnecessary parentheses when a line contains multiline strings
Łukasz Langa [Tue, 5 Jun 2018 04:27:51 +0000 (21:27 -0700)]
Fix unnecessary parentheses when a line contains multiline strings

Fixes #232

5 years agoFix long trivial assignments being wrapped in unnecessary parentheses
Łukasz Langa [Tue, 5 Jun 2018 03:24:50 +0000 (20:24 -0700)]
Fix long trivial assignments being wrapped in unnecessary parentheses

Fixes #273

5 years agoFix handling of empty files
Łukasz Langa [Tue, 5 Jun 2018 02:04:29 +0000 (19:04 -0700)]
Fix handling of empty files

5 years agoConsider stars in testlist_star_expr unpacking (because they are)
Łukasz Langa [Tue, 5 Jun 2018 01:42:16 +0000 (18:42 -0700)]
Consider stars in testlist_star_expr unpacking (because they are)

Fixes #297

5 years agoProperly format unified diff
Łukasz Langa [Tue, 5 Jun 2018 00:10:32 +0000 (17:10 -0700)]
Properly format unified diff

Previously we weren't using timestamps.