Skip to content

Commit

Permalink
Update crates/ruff_linter/src/rules/flake8_pyi/rules/unnecessary_lite…
Browse files Browse the repository at this point in the history
…ral_union.rs

Co-authored-by: Zanie Blue <[email protected]>
  • Loading branch information
diceroll123 and zanieb authored Oct 17, 2023
1 parent 6719359 commit 8aeb3a1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ pub(crate) fn unnecessary_literal_union<'a>(checker: &mut Checker, expr: &'a Exp
let mut literal_subscript = None;
let mut total_literals = 0;

// Adds a member to `literal_exprs` if it is a `Literal` annotation.
// Split members into `literal_exprs` if they are a `Literal` annotation and `other_exprs` otherwise
let mut collect_literal_expr = |expr: &'a Expr, _| {
if let Expr::Subscript(ast::ExprSubscript { value, slice, .. }) = expr {
if checker.semantic().match_typing_expr(value, "Literal") {
Expand Down

0 comments on commit 8aeb3a1

Please sign in to comment.