mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 13:25:17 +00:00
Fix formatting of single with-item with trailing comment (#14005)
This commit is contained in:
parent
20b8a43017
commit
cf0f5e1318
5 changed files with 276 additions and 14 deletions
|
@ -72,3 +72,10 @@ pub(crate) fn is_docstring_code_block_in_docstring_indent_enabled(
|
|||
pub(crate) fn is_join_implicit_concatenated_string_enabled(context: &PyFormatContext) -> bool {
|
||||
context.is_preview()
|
||||
}
|
||||
|
||||
/// Returns `true` if the bugfix for single-with items with a trailing comment targeting Python 3.9 or newer is enabled.
|
||||
///
|
||||
/// See [#14001](https://github.com/astral-sh/ruff/issues/14001)
|
||||
pub(crate) fn is_with_single_target_parentheses_enabled(context: &PyFormatContext) -> bool {
|
||||
context.is_preview()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue