X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/250ba7f04b300df284ba80cd4bb4122b45b41efb..6b381c784b9d74b78cd9e156a7f936764292bb5a:/README.md diff --git a/README.md b/README.md index 69468e2..f454e5a 100644 --- a/README.md +++ b/README.md @@ -73,15 +73,10 @@ black [OPTIONS] [SRC]... Options: -l, --line-length INTEGER How many characters per line to allow. [default: 88] - -t, --target-version [pypy35|cpy27|cpy33|cpy34|cpy35|cpy36|cpy37|cpy38] + -t, --target-version [py27|py33|py34|py35|py36|py37|py38] Python versions that should be supported by Black's output. [default: per-file auto- detection] - --py36 Allow using Python 3.6-only syntax on all - input files. This will put trailing commas - in function signatures and calls also after - *args and **kwargs. [default: per-file - auto-detection] --pyi Format all input files like typing stubs regardless of file extension (useful when piping source on standard input). @@ -189,12 +184,12 @@ brackets and put that in a separate indented line. ```py3 # in: -TracebackException.from_exception(exc, limit, lookup_lines, capture_locals) +ImportantClass.important_method(exc, limit, lookup_lines, capture_locals, extra_argument) # out: -TracebackException.from_exception( - exc, limit, lookup_lines, capture_locals +ImportantClass.important_method( + exc, limit, lookup_lines, capture_locals, extra_argument ) ``` @@ -208,7 +203,7 @@ separate lines. ```py3 # in: -def very_important_function(template: str, *variables, file: os.PathLike, debug: bool = False): +def very_important_function(template: str, *variables, file: os.PathLike, engine: str, header: bool = True, debug: bool = False): """Applies `variables` to the `template` and writes to `file`.""" with open(file, 'w') as f: ... @@ -219,6 +214,8 @@ def very_important_function( template: str, *variables, file: os.PathLike, + engine: str, + header: bool = True, debug: bool = False, ): """Applies `variables` to the `template` and writes to `file`.""" @@ -574,7 +571,7 @@ to denote a significant space character. ```toml [tool.black] line-length = 88 -py36 = true +target_version = ['py37'] include = '\.pyi?$' exclude = ''' @@ -661,8 +658,9 @@ $ where black - Scope: Project Files - Program: - Arguments: `$FilePath$` - - Output paths to refresh: `$FilePathRelativeToProjectRoot$` + - Output paths to refresh: `$FilePath$` - Working directory: `$ProjectFileDir$` + - Uncheck "Auto-save edited files to trigger the watcher" ### Vim @@ -819,8 +817,8 @@ The headers controlling how code is formatted are: - `X-Python-Variant`: if set to `pyi`, `blackd` will act as *Black* does when passed the `--pyi` command line flag. Otherwise, its value must correspond to a Python version or a set of comma-separated Python versions, optionally - prefixed with `cpy` or `pypy`. For example, to request code that is compatible - with PyPy 3.5 and CPython 3.5, set the header to `pypy3.5,cpy3.5`. + prefixed with `py`. For example, to request code that is compatible + with Python 3.5 and 3.6, set the header to `py3.5,py3.6`. If any of these headers are set to invalid values, `blackd` returns a `HTTP 400` error response, mentioning the name of the problematic header in the message body. @@ -939,12 +937,25 @@ More details can be found in [CONTRIBUTING](CONTRIBUTING.md). ## Change Log -### 19.2b0 - -* *Black* no longer normalizes numeric literals to include `_` separators. +### 19.3b0 * new option `--target-version` to control which Python versions - *Black*-formatted code should target + *Black*-formatted code should target (#618) + +* removed `--py36` (use `--target-version=py36` instead) (#724) + +* *Black* no longer normalizes numeric literals to include `_` separators (#696) + +* long `del` statements are now split into multiple lines (#698) + +* type comments are no longer mangled in function signatures + +* improved performance of formatting deeply nested data structures (#509) + +* *Black* now properly formats multiple files in parallel on + Windows (#632) + +* `blackd` now supports CORS (#622) ### 18.9b0 @@ -1352,6 +1363,7 @@ Multiple contributions by: * [Christian Heimes](mailto:christian@python.org) * [Daniel M. Capella](mailto:polycitizen@gmail.com) * [Eli Treuherz](mailto:eli@treuherz.com) +* hauntsaninja * Hugo van Kemenade * [Ivan Katanić](mailto:ivan.katanic@gmail.com) * [Jonas Obrist](mailto:ojiidotch@gmail.com) @@ -1363,5 +1375,6 @@ Multiple contributions by: * [Peter Bengtsson](mailto:mail@peterbe.com) * [Stavros Korokithakis](mailto:hi@stavros.io) * [Sunil Kapil](mailto:snlkapil@gmail.com) +* [Utsav Shah](mailto:ukshah2@illinois.edu) * [Vishwas B Sharma](mailto:sharma.vishwas88@gmail.com) * [Chuck Wooters](mailto:chuck.wooters@microsoft.com)