mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-21 19:05:09 +00:00
Create dedicated is_*_enabled
functions for each preview style (#8988)
This commit is contained in:
parent
7e390d3772
commit
0bda1913d1
7 changed files with 39 additions and 11 deletions
|
@ -74,6 +74,11 @@ impl<'a> PyFormatContext<'a> {
|
|||
..self
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns `true` if preview mode is enabled.
|
||||
pub(crate) const fn is_preview(&self) -> bool {
|
||||
self.options.preview().is_enabled()
|
||||
}
|
||||
}
|
||||
|
||||
impl FormatContext for PyFormatContext<'_> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue