You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 15, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: tests/cases/exhaustive_deps.py
+12-12
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# error: ROH101 hook 'use_effect' used outside component or hook definition
1
+
# error: REACTPY101 hook 'use_effect' used outside component or hook definition
2
2
use_effect(lambda: x) # no need to check deps outside component/hook
3
3
4
4
@@ -12,7 +12,7 @@ def check_effects():
12
12
13
13
use_effect(
14
14
lambda: (
15
-
# error: ROH202 dependency 'x' of function 'lambda' is not specified in declaration of 'use_effect'
15
+
# error: REACTPY202 dependency 'x' of function 'lambda' is not specified in declaration of 'use_effect'
16
16
x
17
17
+y
18
18
),
@@ -21,49 +21,49 @@ def check_effects():
21
21
22
22
use_effect(
23
23
lambda: (
24
-
# error: ROH202 dependency 'x' of function 'lambda' is not specified in declaration of 'use_effect'
24
+
# error: REACTPY202 dependency 'x' of function 'lambda' is not specified in declaration of 'use_effect'
25
25
x
26
26
)
27
27
)
28
28
29
29
use_effect(
30
30
lambda: (
31
-
# error: ROH202 dependency 'x' of function 'lambda' is not specified in declaration of 'use_effect'
31
+
# error: REACTPY202 dependency 'x' of function 'lambda' is not specified in declaration of 'use_effect'
32
32
x.y
33
33
),
34
34
[
35
-
# error: ROH200 dependency arg of 'use_effect' is not destructured - dependencies should be refered to directly, not via an attribute or key of an object
35
+
# error: REACTPY200 dependency arg of 'use_effect' is not destructured - dependencies should be refered to directly, not via an attribute or key of an object
36
36
x.y
37
37
],
38
38
)
39
39
40
40
module.use_effect(
41
41
lambda: (
42
-
# error: ROH202 dependency 'x' of function 'lambda' is not specified in declaration of 'use_effect'
42
+
# error: REACTPY202 dependency 'x' of function 'lambda' is not specified in declaration of 'use_effect'
43
43
x
44
44
),
45
45
[],
46
46
)
47
47
48
48
module.submodule.use_effect(
49
49
lambda: (
50
-
# error: ROH202 dependency 'x' of function 'lambda' is not specified in declaration of 'use_effect'
50
+
# error: REACTPY202 dependency 'x' of function 'lambda' is not specified in declaration of 'use_effect'
51
51
x
52
52
),
53
53
[],
54
54
)
55
55
56
56
use_effect(
57
57
lambda: (
58
-
# error: ROH202 dependency 'x' of function 'lambda' is not specified in declaration of 'use_effect'
58
+
# error: REACTPY202 dependency 'x' of function 'lambda' is not specified in declaration of 'use_effect'
59
59
x
60
60
),
61
61
args=[],
62
62
)
63
63
64
64
use_effect(
65
65
function=lambda: (
66
-
# error: ROH202 dependency 'x' of function 'lambda' is not specified in declaration of 'use_effect'
66
+
# error: REACTPY202 dependency 'x' of function 'lambda' is not specified in declaration of 'use_effect'
67
67
x
68
68
),
69
69
args=[],
@@ -75,7 +75,7 @@ def my_effect():
75
75
76
76
@use_effect(args=[])
77
77
defmy_effect():
78
-
# error: ROH202 dependency 'x' of function 'my_effect' is not specified in declaration of 'use_effect'
78
+
# error: REACTPY202 dependency 'x' of function 'my_effect' is not specified in declaration of 'use_effect'
79
79
x
80
80
81
81
@use_effect(args=[])
@@ -86,7 +86,7 @@ def my_effect(*args, **kwargs):
86
86
87
87
@module.use_effect(args=[])
88
88
defmy_effect():
89
-
# error: ROH202 dependency 'x' of function 'my_effect' is not specified in declaration of 'use_effect'
89
+
# error: REACTPY202 dependency 'x' of function 'my_effect' is not specified in declaration of 'use_effect'
0 commit comments