Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion flake8_functions/function_length.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ def get_function_start_row(func_def: AnyFuncdef) -> int:
first_meaningful_expression_index = 0
if (
isinstance(func_def.body[0], ast.Expr)
and isinstance(func_def.body[0].value, ast.Str)
and isinstance(func_def.body[0].value, ast.Constant)
and isinstance(func_def.body[0].value.value, str)
and len(func_def.body) > 1
): # First expression is docstring - we ignore it
first_meaningful_expression_index = 1
Expand Down