mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-15 08:00:46 +00:00
fix is_raw_string for multiple prefixes (#6865)
fix `is_raw_string` in the presence of other prefixes (like `rb"foo"`) fixes #6864
This commit is contained in:
parent
d1f07008f7
commit
1c66bb80b7
2 changed files with 2 additions and 2 deletions
|
@ -377,7 +377,7 @@ impl StringPrefix {
|
|||
}
|
||||
|
||||
pub(super) const fn is_raw_string(self) -> bool {
|
||||
matches!(self, StringPrefix::RAW | StringPrefix::RAW_UPPER)
|
||||
self.contains(StringPrefix::RAW) || self.contains(StringPrefix::RAW_UPPER)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue