Skip to content

Commit 86f7bd9

Browse files
committed
Use protowhat context creation helper
1 parent 82a4fac commit 86f7bd9

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

shellwhat/sct_syntax.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,10 @@
22

33
from shellwhat.State import State
44
from shellwhat import checks
5-
import builtins
6-
from protowhat.sct_syntax import create_sct_context
5+
from protowhat.sct_syntax import get_checks_dict, create_sct_context
76

87
# used in Chain and F, to know what methods are available
9-
sct_dict = {
10-
k: v
11-
for k, v in vars(checks).items()
12-
if k not in builtins.__dict__
13-
if not k.startswith("__")
14-
}
8+
sct_dict = get_checks_dict(checks)
159
SCT_CTX = create_sct_context(State, sct_dict)
1610

1711
# used in test_exercise, so that scts without Ex() don't run immediately

0 commit comments

Comments
 (0)