@@ -205,7 +205,7 @@ standalone comments that immediately precede the given function/class.
205205
206206_ Black_ will enforce single empty lines between a class-level docstring and the first
207207following field or method. This conforms to
208- [ PEP 257] ( https://www .python.org/dev/peps /pep-0257/#multi-line-docstrings ) .
208+ [ PEP 257] ( https://peps .python.org/pep-0257/#multi-line-docstrings ) .
209209
210210_ Black_ won't insert empty lines after function docstrings unless that empty line is
211211required due to an inner function starting immediately after.
@@ -263,10 +263,10 @@ _Black_ to merge consecutive string literals that ended up on the same line (see
263263
264264Why settle on double quotes? They anticipate apostrophes in English text. They match the
265265docstring standard described in
266- [ PEP 257] ( https://www .python.org/dev/peps/ pep-0257/#what-is-a-docstring ) . An empty
267- string in double quotes (` "" ` ) is impossible to confuse with a one double-quote
268- regardless of fonts and syntax highlighting used. On top of this, double quotes for
269- strings are consistent with C which Python interacts a lot with.
266+ [ PEP 257] ( https://peps .python.org/pep-0257/#what-is-a-docstring ) . An empty string in
267+ double quotes (` "" ` ) is impossible to confuse with a one double-quote regardless of
268+ fonts and syntax highlighting used. On top of this, double quotes for strings are
269+ consistent with C which Python interacts a lot with.
270270
271271On certain keyboard layouts like US English, typing single quotes is a bit easier than
272272double quotes. The latter requires use of the Shift key. My recommendation here is to
@@ -295,7 +295,7 @@ parts and uppercase letters for the digits themselves: `0xAB` instead of `0XAB`
295295
296296_ Black_ will break a line before a binary operator when splitting a block of code over
297297multiple lines. This is so that _ Black_ is compliant with the recent changes in the
298- [ PEP 8] ( https://www .python.org/dev/peps /pep-0008/#should-a-line-break-before-or-after-a-binary-operator )
298+ [ PEP 8] ( https://peps .python.org/pep-0008/#should-a-line-break-before-or-after-a-binary-operator )
299299style guide, which emphasizes that this approach improves readability.
300300
301301Almost all operators will be surrounded by single spaces, the only exceptions are unary
@@ -321,7 +321,7 @@ h = config['base'] ** 2
321321### Slices
322322
323323PEP 8
324- [ recommends] ( https://www .python.org/dev/peps /pep-0008/#whitespace-in-expressions-and-statements )
324+ [ recommends] ( https://peps .python.org/pep-0008/#whitespace-in-expressions-and-statements )
325325to treat ` : ` in slices as a binary operator with the lowest priority, and to leave an
326326equal amount of space on either side, except if a parameter is omitted (e.g.
327327` ham[1 + 1 :] ` ). It recommends no spaces around ` : ` operators for "simple expressions"
@@ -395,7 +395,7 @@ be written in C, or they might be third-party, or their implementation may be ov
395395dynamic, and so on).
396396
397397To solve this,
398- [ stub files with the ` .pyi ` file extension] ( https://www .python.org/dev/peps /pep-0484/#stub-files )
398+ [ stub files with the ` .pyi ` file extension] ( https://peps .python.org/pep-0484/#stub-files )
399399can be used to describe typing information for an external module. Those stub files omit
400400the implementation of classes and functions they describe, instead they only contain the
401401structure of the file (listing globals, functions, and classes with their members). The
0 commit comments