mirror of https://github.com/scrapy/scrapy.git
parent
fcb5ab6cff
commit
5bbf8124ac
|
|
@ -263,9 +263,7 @@ def is_generator_with_return_value(callable: Callable[..., Any]) -> bool:
|
|||
|
||||
def returns_none(return_node: ast.Return) -> bool:
|
||||
value = return_node.value
|
||||
return (
|
||||
value is None or isinstance(value, ast.NameConstant) and value.value is None
|
||||
)
|
||||
return value is None or isinstance(value, ast.Constant) and value.value is None
|
||||
|
||||
if inspect.isgeneratorfunction(callable):
|
||||
func = callable
|
||||
|
|
|
|||
Loading…
Reference in New Issue