Skip to content

Commit

Permalink
added the py311 to target-version config (#3898)
Browse files Browse the repository at this point in the history
  • Loading branch information
iamibi authored Sep 24, 2023
1 parent 8c5d96f commit 5f6ea5f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions docs/usage_and_configuration/the_basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -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-version = ["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,
Expand Down

0 comments on commit 5f6ea5f

Please sign in to comment.