We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3dc9c15 commit 9b239b9Copy full SHA for 9b239b9
utils/manifest/_internal/validate.py
@@ -1,5 +1,6 @@
1
import ast
2
import importlib.util
3
+import inspect
4
import json
5
import sys
6
from pathlib import Path
@@ -176,7 +177,8 @@ def assert_nodeids_exist(obj: dict) -> list[str]:
176
177
178
if function_name is not None:
179
class_obj = getattr(module, class_name)
- found_function = hasattr(class_obj, function_name)
180
+ attr = getattr(class_obj, function_name, None)
181
+ found_function = attr is not None and inspect.isfunction(attr)
182
183
if not found_function:
184
errors.append(f"{file_path}::{class_name} does not contain function {function_name}")
0 commit comments