Commit Graph

31 Commits

Author SHA1 Message Date
Łukasz Langa
048efa7476 Trivial nits 2018-06-19 23:08:10 -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
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
Hugo
9e9ee449b4 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
2018-06-06 09:50:08 -07:00
Łukasz Langa
c891c65b6b Store grammar pickle caches in CACHE_DIR
Fixes #192

Fixes #203
2018-05-19 14:06:27 -07:00
Christian Heimes
642f240253 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>
2018-05-18 16:59:05 -04:00
Christian Heimes
adf4ebd2d9 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>
2018-05-04 13:52:17 -07:00
Łukasz Langa
54d707e10a Allow standalone comments to close code blocks
Fixes #16
Fixes #32
2018-04-23 16:17:12 -07:00
Łukasz Langa
c86fb36232 Accelerate Unicode identifier support (backport from Lib/tokenize.py) 2018-04-23 14:31:35 -07:00
Łukasz Langa
82198030ee Remove nonsensical grammar from blib2to3 2018-04-23 14:24:14 -07:00
Gregory P. Smith
959ff798bc 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.
2018-04-23 14:19:24 -07:00
Łukasz Langa
6a9d09cd44 Store pickles for 3.8.0a0 2018-04-18 22:17:00 -07:00
Łukasz Langa
dcd77136f8 Update 3.6.4 grammar pickle 2018-04-18 17:41:49 -07:00
Zsolt Dollenstein
5192ed484b Parse complex expressions in parameters after * and ** 2018-04-17 20:34:02 +01:00
Łukasz Langa
e41844feb7 Remove debug print 2018-04-11 23:22:22 -07:00
Łukasz Langa
9138a75b75 Fix parsing of unaligned standalone comments
Fixes #99
Fixes #112
2018-04-11 23:22:22 -07:00
Zsolt Dollenstein
ecdbf085a7 Add support for all valid string literals (#115) 2018-04-09 14:36:40 -07:00
Łukasz Langa
e36b8c71bb [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.
2018-04-05 02:29:01 -07:00
Łukasz Langa
63da5d088c 3.6.5 grammar pickles 2018-04-04 09:55:56 -07:00
Łukasz Langa
2d80366ac1 [blib2to3] Make the grammar pickles faster 2018-04-02 18:28:24 -07:00
Łukasz Langa
fc869039eb Don't crash and burn on empty lines with trailing whitespace
Fixes #80
2018-03-26 18:41:25 -07:00
Łukasz Langa
8c565d8684 blib2to3: Never put prefixes on INDENT leaves either 2018-03-23 17:15:47 -07:00
Łukasz Langa
6316e293ac Automatic detection of deprecated Python 2 forms of print and exec
Note: if those are handled, you can't use --safe because this check is using
Python 3.6+ builtin AST.

Fixes #49
2018-03-22 23:19:23 -07:00
Łukasz Langa
5fa38d4c3b Fix tests on 3.7 2018-03-20 19:04:49 -07:00
Łukasz Langa
d9c6b99073 Restore ability to format code with legacy usage of async as a name
Fixes #20
Fixes #42
2018-03-20 18:54:01 -07:00
Łukasz Langa
c90cf42d7c blib2to3: Never put prefixes on DEDENT leaves 2018-03-16 21:47:52 -07:00
Łukasz Langa
907dc6c35e Clean up typing ignores, fix build 2018-03-15 23:26:56 -07:00
Łukasz Langa
ed48bd378d Mention *args and **kwargs backport 2018-03-15 10:58:15 -07:00
Łukasz Langa
f5cc3e3556 Actually use the bundled Grammar.txt 2018-03-14 14:20:16 -07:00
Łukasz Langa
e74117f172 Initial commit 2018-03-14 12:55:32 -07:00