Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

Commit 2df0669

Browse files
Archmongerrmorshea
authored andcommitted
check for idom.component instead of just idom
1 parent d3d971c commit 2df0669

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

flake8_idom_hooks/utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ def is_hook_def(node: ast.FunctionDef) -> bool:
2828

2929

3030
def is_component_def(node: ast.FunctionDef) -> bool:
31-
return any(decorator.value.id == "idom" for decorator in node.decorator_list)
31+
return any(
32+
decorator.value.id == "idom" and decorator.attr == "component"
33+
for decorator in node.decorator_list
34+
)
3235

3336

3437
def is_hook_function_name(name: str) -> bool:

0 commit comments

Comments
 (0)