From: Ɓukasz Langa Date: Fri, 27 Apr 2018 21:02:10 +0000 (-0700) Subject: 18.4a4 hotfix: don't populate the cache on --check X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/0f3ecb7e500f9668a7f9ec74a43d8d565df6e2ea 18.4a4 hotfix: don't populate the cache on --check Fixes #175 --- diff --git a/README.md b/README.md index 6cb50eb..bc8977b 100644 --- a/README.md +++ b/README.md @@ -522,6 +522,11 @@ More details can be found in [CONTRIBUTING](CONTRIBUTING.md). ## Change Log +### 18.4a4 + +* don't populate the cache on `--check` (#175) + + ### 18.4a3 * added a "cache"; files already reformatted that haven't changed on disk diff --git a/black.py b/black.py index 5458198..4c5f0f0 100644 --- a/black.py +++ b/black.py @@ -43,7 +43,7 @@ from blib2to3 import pygram, pytree from blib2to3.pgen2 import driver, token from blib2to3.pgen2.parse import ParseError -__version__ = "18.4a3" +__version__ = "18.4a4" DEFAULT_LINE_LENGTH = 88 # types @@ -245,7 +245,7 @@ def reformat_one( ) ): changed = Changed.YES - if write_back != WriteBack.DIFF and changed is not Changed.NO: + if write_back == WriteBack.YES and changed is not Changed.NO: write_cache(cache, [src], line_length) report.done(src, changed) except Exception as exc: @@ -312,7 +312,7 @@ async def schedule_formatting( if cancelled: await asyncio.gather(*cancelled, loop=loop, return_exceptions=True) - if write_back != WriteBack.DIFF and formatted: + if write_back == WriteBack.YES and formatted: write_cache(cache, formatted, line_length)