{"record":{"id":"28e6656835f23ef1","repo":"astral-sh/ruff","slug":"attr-name-should-have-one-argument","errorCode":null,"errorMessage":"`{attr_name}` should have one argument","messagePattern":"`(.+?)` should have one argument","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/ruff_linter/src/rules/flake8_pie/rules/multiple_starts_ends_with.rs","lineNumber":165,"sourceCode":"                        func: _,\n                        arguments:\n                            Arguments {\n                                args,\n                                keywords: _,\n                                range: _,\n                                node_index: _,\n                            },\n                        range_start: _,\n                        node_index: _,\n                    }) = expr\n                    else {\n                        unreachable!(\n                            \"{}\",\n                            format!(\"Indices should only contain `{attr_name}` calls\")\n                        )\n                    };\n                    args.first()\n                        .unwrap_or_else(|| panic!(\"`{attr_name}` should have one argument\"))\n                })\n                .collect();\n\n            let node = Expr::Tuple(ast::ExprTuple {\n                elts: words\n                    .iter()\n                    .flat_map(|value| {\n                        if let Expr::Tuple(tuple) = value {\n                            Left(tuple.iter())\n                        } else {\n                            Right(iter::once(*value))\n                        }\n                    })\n                    .cloned()\n                    .collect(),\n                ctx: ExprContext::Load,\n                range: TextRange::default(),\n                node_index: ruff_python_ast::AtomicNodeIndex::NONE,","sourceCodeStart":147,"sourceCodeEnd":183,"githubUrl":"https://github.com/astral-sh/ruff/blob/15f3fe6b15a5f00172f34b0f542f8ea277f5a586/crates/ruff_linter/src/rules/flake8_pie/rules/multiple_starts_ends_with.rs#L147-L183","documentation":"An unreachable! guard in the flake8-pie multiple-starts-ends-with rule: the let-else matched an expression shape the rule never intends to process (only calls of .startswith/.endswith reach here). Firing it means the rule's visitor let a non-matching expression through.","triggerScenarios":"Thrown at crates/ruff_linter/src/rules/flake8_pie/rules/multiple_starts_ends_with.rs:165 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Tighten the visitor so only matching call expressions reach the match","Handle the unexpected shape explicitly instead of unreachable!"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"15f3fe6b15a5f00172f34b0f542f8ea277f5a586","analyzedAt":"2026-09-05T10:32:37.492Z","contentChangedAt":"2026-09-05T10:32:37.492Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}