Jelle Zijlstra
cc48bc56ca
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
2018-08-17 15:03:58 +01:00
Zsolt Dollenstein
e94a41f92a
Look at actual parenthesis when generating ignored leafs.
...
Fixes #385
2018-07-22 15:30:02 +01:00
Zsolt Dollenstein
df965b0558
update to mypy 0.620 and make tests pass again
...
Fixes #408
2018-07-18 22:10:52 +01:00
Anthony Sottile
c50b107493
pre-commit: use exclusion instead of ever-growing regex ( #382 )
2018-07-09 22:42:38 +02:00
Zsolt Dollenstein
3316dce22d
add change log entry
2018-07-02 18:02:13 +01:00
Zsolt Dollenstein
dd8bde6d2f
Improve get_future_imports implementation.
...
Closes #389 .
2018-07-02 17:49:47 +01:00
cclauss
3bdd423891
TravisCI: Test on production Python 3.7 and 3.8-dev ( #393 )
2018-07-02 18:05:40 +02:00
David Szotten
579a8f9344
Suggest BufWritePre instead of BufWritePost for vi ( #376 )
...
closes #321
2018-06-23 00:56:05 -07:00
Łukasz Langa
41240e9a78
18.6b4
2018-06-21 14:25:07 -07:00
Łukasz Langa
d93e726806
Don't freeze when multiple comments directly precede # fmt: off
...
Fixes #371
2018-06-21 14:03:01 -07:00
Łukasz Langa
98b6c887da
18.6b3
2018-06-20 12:00:07 -07:00
Łukasz Langa
c2327c83b2
More tests for # fmt: off
...
Two more known limitations that I don't feel like solving now. Probably very
low priority.
2018-06-19 23:46:58 -07:00
Łukasz Langa
048efa7476
Trivial nits
2018-06-19 23:08:10 -07:00
Łukasz Langa
2dfa69bb7f
Stop Click from crashing Black on invalid environments
...
Fixes #277
2018-06-19 22:55:57 -07:00
Łukasz Langa
e1ef57a29e
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
2018-06-19 20:44:47 -07:00
Łukasz Langa
df2ae3bbe6
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
2018-06-19 17:32:41 -07:00
Łukasz Langa
8a8c58252c
Support # fmt: off/on
pairs within brackets
...
Fixes #329
2018-06-18 22:37:46 -07:00
Łukasz Langa
013cb2b374
Update README with missing fixes in Change Log
2018-06-18 22:37:46 -07:00
Łukasz Langa
e4340f5c3e
Cache generated comments
2018-06-18 22:37:46 -07:00
Mariatta
257f7193fa
Add travis badge and GitHub Fork banner to docs ( #365 )
2018-06-18 20:12:49 -07:00
Rupert Bedford
d6872cdf87
Add pyls-black to README ( #361 )
2018-06-16 13:14:51 -07:00
Jelle Zijlstra
9db828c3de
Add blank line after constants in stub file ( #360 )
...
Fixes #340
2018-06-16 11:53:45 -07:00
Mariatta
af8fd24068
Add code snippet for using black badge in .rst ( #356 )
2018-06-15 15:12:16 -07:00
Katrin Leinweber
7462ef3ea6
Harmonise with other instances ( #347 )
2018-06-13 11:49:47 -07:00
Neraste
42a3fe5331
Ignore symbolic links pointing outside of the root directory ( #339 )
...
Fixes #338
2018-06-13 00:07:04 -07:00
Joseph Larson
fb34c9e195
Remove reference to deprecated Visual Studio Code extension ( #343 )
2018-06-12 13:36:55 -07:00
Zsolt Dollenstein
99743d2d09
Exclude profiling data when doing black . in this repo
2018-06-10 09:51:18 +01:00
Zsolt Dollenstein
efcd039482
Fix string normalization eating all backslashes above 3
2018-06-10 09:44:41 +01:00
Łukasz Langa
2cf125a97c
Add failing test data
2018-06-09 23:27:00 -07:00
Łukasz Langa
2cc42f7892
Don't mark subtrees as changed that were already marked.
2018-06-09 19:49:20 -07:00
Łukasz Langa
2228890d62
Cache child sibling lookups
...
Removes catastrophically quadratic behavior on nodes with very many siblings.
2018-06-09 18:52:46 -07:00
Łukasz Langa
ec31ee967d
Make test_black.py work in profilers
2018-06-09 18:49:39 -07:00
Łukasz Langa
d240ca25ea
Make is_complex_subscript()
ignore list literals
...
This fixes catastrophically quadratic behavior on long lists.
2018-06-09 16:04:09 -07:00
Łukasz Langa
94ebcb5085
Move profiling data out of tests/data
2018-06-09 15:48:41 -07:00
Zsolt Dollenstein
5d0a469e8e
Fix string normalization sometimes producing invalid fstrings ( #327 )
2018-06-09 12:30:49 -07:00
Daniel M. Capella
aad62d3de8
Add .toml from tests to MANIFEST.in ( #325 )
...
Needed for `test_piping_diff()`.
2018-06-08 22:02:35 -07:00
Łukasz Langa
ff2e5dd6e6
18.6b2
2018-06-08 12:07:43 -07:00
Łukasz Langa
5623581e09
Update README with missing Change Log entries
2018-06-08 12:05:44 -07:00
Łukasz Langa
8482d38fb4
Return early from comment placement calculation on lines without comments
2018-06-08 12:00:53 -07:00
Loren Carvalho
39e9347687
Add -h
as a shortcut for --help
( #316 )
2018-06-07 19:43:04 -07:00
Zsolt Dollenstein
7f3678885f
fix handling of empty triple quoted strings ( #314 )
2018-06-07 11:41:34 -07:00
Łukasz Langa
75a9447448
Don't crash the Vim plugin
...
Fixes #312
2018-06-07 11:40:41 -07:00
Łukasz Langa
ef362b4ea8
2018 is not the year of Unicode on your desktop
2018-06-07 11:24:55 -07:00
Łukasz Langa
de702bcdf1
Preliminary work on Poetry integration
2018-06-07 00:15:26 -07:00
Łukasz Langa
82d09eda09
Fix link
2018-06-06 17:29:31 -07:00
Łukasz Langa
75eb91443e
It works better when dependencies are installed. Who knew?
2018-06-06 17:13:51 -07:00
Łukasz Langa
7ba4725993
Trim TOC to fit in two lines again
2018-06-06 17:07:07 -07:00
Łukasz Langa
fac4cf995c
Use black .
now that we can
2018-06-06 17:04:32 -07:00
Łukasz Langa
489d00ed8f
Support pyproject.toml
...
Fixes #65
2018-06-06 17:02:10 -07:00
Łukasz Langa
f71db23824
Move test data to data
2018-06-06 15:48:38 -07:00