Sitelet https://github.com/psf/black/commit/5379d4f3f460ec9b7063dd1cc10f437b0edf9ae3
Skip to content

Commit 5379d4f

Browse files
stub style: remove some possible future changes (#2940)
Fixes #2938. All of these suggested future changes are out of scope for an autoformatter and should be handled by a linter instead.
1 parent f87df0e commit 5379d4f

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

‎docs/the_black_code_style/current_style.md‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -399,16 +399,11 @@ recommended code style for those files is more terse than PEP 8:
399399
_Black_ enforces the above rules. There are additional guidelines for formatting `.pyi`
400400
file that are not enforced yet but might be in a future version of the formatter:
401401

402-
- all function bodies should be empty (contain `...` instead of the body);
403-
- do not use docstrings;
404402
- prefer `...` over `pass`;
405-
- for arguments with a default, use `...` instead of the actual default;
406403
- avoid using string literals in type annotations, stub files support forward references
407404
natively (like Python 3.7 code with `from __future__ import annotations`);
408405
- use variable annotations instead of type comments, even for stubs that target older
409-
versions of Python;
410-
- for arguments that default to `None`, use `Optional[]` explicitly;
411-
- use `float` instead of `Union[int, float]`.
406+
versions of Python.
412407

413408
## Pragmatism
414409

0 commit comments

Comments
 (0)