black --target-version py311 .

Category: Python & pip

black --target-version py311 .

Format targeting Python 3.11 syntax specifically

Formats code targeting Python 3.11 syntax — avoids using syntax not available in that version.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.