black/docs
Richard Si 1d2d7264ec
Fix incorrect space before colon in if/while stmts (#1655)
* Fix incorrect space before colon in if/while stmts

Previously Black would format this code

```
if (foo := True):
	print(foo)
```

as

```
if (foo := True) :
	print(foo)
```

adding an incorrect space after the RPAR. Buggy code in the
normalize_invisible_parens function caused the colon to be wrapped in
invisible parentheses. The LPAR of that pair was then prefixed with a
single space at the request of the whitespace function.

This commit fixes the accidental skipping of a pre-condition check
which must return True before parenthesis normalization of a specific
child Leaf or Node can happen. The pre-condition check being skipped
was why the colon was wrapped in invisible parentheses.

* Add an entry in CHANGES.md
2020-08-31 14:20:05 -07:00
..
_static Scrollable sidebar (#1457) 2020-05-23 11:56:50 -07:00
reference Use properly renamed function name in docs 2020-08-21 16:45:30 +02:00
authors.md Make doc generation a little smarter, update doc sections 2020-08-24 14:42:17 +02:00
black_primer.md Upgrade docs to Sphinx 3+ and add doc build test (#1613) 2020-08-21 00:06:41 +02:00
blackd.md Fix grammatical typos in black_primer and blackd (#1504) 2020-06-16 11:57:33 -07:00
change_log.md Fix incorrect space before colon in if/while stmts (#1655) 2020-08-31 14:20:05 -07:00
compatible_configs.md Remove flake8 W503 from docs as it is ignored by default (#1661) 2020-08-31 14:18:43 -07:00
conf.py Make doc generation a little smarter, update doc sections 2020-08-24 14:42:17 +02:00
contributing_to_black.md Fix dealing with generated files in docs 2020-08-21 16:45:30 +02:00
editor_integration.md Add links regarding Spotless integration for gradle/maven users (#1622) 2020-08-26 03:54:05 +02:00
github_actions.md Fix dealing with generated files in docs 2020-08-21 16:45:30 +02:00
ignoring_unmodified_files.md Fix dealing with generated files in docs 2020-08-21 16:45:30 +02:00
index.rst Upgrade docs to Sphinx 3+ and add doc build test (#1613) 2020-08-21 00:06:41 +02:00
installation_and_usage.md Fix dealing with generated files in docs 2020-08-21 16:45:30 +02:00
make.bat add sphinx docs skeleton (#71) 2018-03-23 14:27:04 -07:00
Makefile add sphinx docs skeleton (#71) 2018-03-23 14:27:04 -07:00
pyproject_toml.md Fix dealing with generated files in docs 2020-08-21 16:45:30 +02:00
requirements.txt Upgrade docs to Sphinx 3+ and add doc build test (#1613) 2020-08-21 00:06:41 +02:00
show_your_style.md Fix dealing with generated files in docs 2020-08-21 16:45:30 +02:00
the_black_code_style.md Remove flake8 W503 from docs as it is ignored by default (#1661) 2020-08-31 14:18:43 -07:00
version_control_integration.md Fix dealing with generated files in docs 2020-08-21 16:45:30 +02:00