Skip to content

Commit

Permalink
Remove duplicate code
Browse files Browse the repository at this point in the history
  • Loading branch information
epenet committed Jul 8, 2024
1 parent dc3773b commit d980e72
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions crates/ruff_linter/src/rules/flake8_return/rules/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -799,14 +799,6 @@ pub(crate) fn function(
}
} else {
if checker.enabled(Rule::UnnecessaryReturnNone) {
// Skip properties.
let semantic = checker.semantic();
if decorator_list
.iter()
.any(|decorator| semantic.match_builtin_expr(&decorator.expression, "property"))
{
return;
}
// Skip functions that have a return annotation that is not `None`.
if returns.map_or(true, Expr::is_none_literal_expr) {
unnecessary_return_none(checker, decorator_list, &stack);
Expand Down

0 comments on commit d980e72

Please sign in to comment.