Skip to content

Commit

Permalink
docs: Add typed_params_trailing_comma to future_style.md
Browse files Browse the repository at this point in the history
Signed-off-by: RedGuy12 <[email protected]>
  • Loading branch information
cobaltt7 committed Jan 26, 2024
1 parent 84fed1b commit 561d8c5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions docs/the_black_code_style/future_style.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ Currently, the following features are included in the preview style:
brackets ([see below](labels/hug-parens))
- `no_normalize_fmt_skip_whitespace`: whitespace before `# fmt: skip` comments is no
longer normalized
- `typed_params_trailing_comma`: consistently add trailing commas to typed function
parameters

(labels/unstable-features)=

Expand Down
2 changes: 1 addition & 1 deletion src/black/mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,10 @@ class Preview(Enum):
string_processing = auto()
hug_parens_with_braces_and_square_brackets = auto()
unify_docstring_detection = auto()
typed_params_trailing_comma = auto()
no_normalize_fmt_skip_whitespace = auto()
wrap_long_dict_values_in_parens = auto()
multiline_string_handling = auto()
typed_params_trailing_comma = auto()


UNSTABLE_FEATURES: Set[Preview] = {
Expand Down
2 changes: 1 addition & 1 deletion tests/data/cases/typed_params_trailing_comma.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# flags: --preview
def long_function_name_goes_here(
x: Callable[List[int]],
x: Callable[List[int]]
) -> Union[List[int], float, str, bytes, Tuple[int]]:
pass

Expand Down

0 comments on commit 561d8c5

Please sign in to comment.