mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-22 11:25:26 +00:00
Preview Style: Format module level docstring (#9725)
Co-authored-by: Micha Reiser <micha@reiser.io>
This commit is contained in:
parent
80fc02e7d5
commit
b47f85eb69
5 changed files with 30 additions and 143 deletions
|
@ -74,3 +74,10 @@ pub(crate) const fn is_hex_codes_in_unicode_sequences_enabled(context: &PyFormat
|
|||
pub(crate) const fn is_multiline_string_handling_enabled(context: &PyFormatContext) -> bool {
|
||||
context.is_preview()
|
||||
}
|
||||
|
||||
/// Returns `true` if the [`multiline_string_handling`](https://github.com/astral-sh/ruff/pull/9725) preview style is enabled.
|
||||
/// Black does not [`format docstrings`](https://github.com/psf/black/issues/3493) so we keep this
|
||||
/// preview for compatibility with Black.
|
||||
pub(crate) const fn is_format_module_docstring_enabled(context: &PyFormatContext) -> bool {
|
||||
context.is_preview()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue