X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/7be273531852a16a407fcb66d5efeede0f7ca474..9edba85f71d50d12996ef7bda576426362016171:/docs/usage_and_configuration/the_basics.md diff --git a/docs/usage_and_configuration/the_basics.md b/docs/usage_and_configuration/the_basics.md index 2a46148..5b132a9 100644 --- a/docs/usage_and_configuration/the_basics.md +++ b/docs/usage_and_configuration/the_basics.md @@ -52,18 +52,19 @@ See also [the style documentation](labels/line-length). #### `-t`, `--target-version` -Python versions that should be supported by Black's output. You should include all -versions that your code supports. If you support Python 3.7 through 3.10, you should -write: +Python versions that should be supported by Black's output. You can run `black --help` +and look for the `--target-version` option to see the full list of supported versions. +You should include all versions that your code supports. If you support Python 3.8 +through 3.11, you should write: ```console -$ black -t py37 -t py38 -t py39 -t py310 +$ black -t py38 -t py39 -t py310 -t py311 ``` In a [configuration file](#configuration-via-a-file), you can write: ```toml -target-versions = ["py37", "py38", "py39", "py310"] +target-version = ["py38", "py39", "py310", "py311"] ``` _Black_ uses this option to decide what grammar to use to parse your code. In addition, @@ -193,8 +194,8 @@ configuration file for consistent results across environments. ```console $ black --version -black, 23.3.0 (compiled: yes) -$ black --required-version 23.3.0 -c "format = 'this'" +black, 23.10.0 (compiled: yes) +$ black --required-version 23.10.0 -c "format = 'this'" format = "this" $ black --required-version 31.5b2 -c "still = 'beta?!'" Oh no! 💥 💔 💥 The required version does not match the running version! @@ -285,7 +286,7 @@ You can check the version of _Black_ you have installed using the `--version` fl ```console $ black --version -black, 23.3.0 +black, 23.10.0 ``` #### `--config`