This commit is contained in:
hauntsaninja 2025-12-13 22:21:24 -08:00
parent 55442384ee
commit 9868349475
3 changed files with 8 additions and 3 deletions

View File

@ -4,6 +4,7 @@ extend-exclude = [
"crates/ty_vendored/vendor/**/*", "crates/ty_vendored/vendor/**/*",
"**/resources/**/*", "**/resources/**/*",
"**/snapshots/**/*", "**/snapshots/**/*",
"crates/ruff_linter/src/rules/flake8_implicit_str_concat/rules/collection_literal.rs",
# Completion tests tend to have a lot of incomplete # Completion tests tend to have a lot of incomplete
# words naturally. It's annoying to have to make all # words naturally. It's annoying to have to make all
# of them actually words. So just ignore typos here. # of them actually words. So just ignore typos here.

View File

@ -75,8 +75,12 @@ pub(crate) fn implicit_string_concatenation_in_collection_literal(
if !string_like.is_implicit_concatenated() { if !string_like.is_implicit_concatenated() {
continue; continue;
} }
if parenthesized_range(string_like.as_expression_ref(), expr.into(), checker.tokens()) if parenthesized_range(
.is_some() string_like.as_expression_ref(),
expr.into(),
checker.tokens(),
)
.is_some()
{ {
continue; continue;
} }

View File

@ -1,6 +1,6 @@
pub(crate) use collection_literal::*;
pub(crate) use explicit::*; pub(crate) use explicit::*;
pub(crate) use implicit::*; pub(crate) use implicit::*;
pub(crate) use collection_literal::*;
mod collection_literal; mod collection_literal;
mod explicit; mod explicit;