Skip to content

Commit 1c2efa8

Browse files
committed
missing ast.IfExp Info module
1 parent cbb9827 commit 1c2efa8

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828

2929
* fixed a bug in the above/below argument command, which occasionally caused of by one errors.
3030

31+
* in the info module, fixed a bug in the get_body function where ast.IfExp was missing for some reason.
32+
3133
### Changed
3234

3335
* The Caster bundles have been modified to be usable with aenea! both the 0.5 and 0.6 versions have been tested, with PythonVoiceCodingPlugin running on Ubuntu 16.04.

library/info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def get_iterator(root):
163163
# need to revisit this
164164
def get_body(root):
165165
return (
166-
root.body if match_node(root,(ast.Lambda,ast.If,ast.While,ast.With,ast.For, )) else None
166+
root.body if match_node(root,(ast.Lambda,ast.If,ast.While,ast.With,ast.For, ast.IfExp)) else None
167167
)
168168

169169

queries/big_roi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def handle_single(self,view_information,query_description,extra = {}):
2424
def preliminary(self,view_information,query_description, extra = {}):
2525
selection = self._get_selection(view_information,extra)
2626
build = self.general_build
27-
if not build or not build[0] :
27+
if not build or not build[0]:
2828
return None,None,None,None
2929
root,atok,m,r = build
3030
selection = m.forward(selection)
@@ -116,7 +116,7 @@ def case_two(self,view_information,query_description, extra = {}):
116116
atok=atok,
117117
root = definition_node,
118118
adjective_word = query_description["adjective"],
119-
level_nodes = find_all_nodes(definition_node,(ast.If,ast.While,ast.For,ast.Try,ast.With,ast.FunctionDef)),
119+
level_nodes = find_all_nodes(definition_node, (ast.If,ast.While,ast.For,ast.Try,ast.With,ast.FunctionDef)),
120120
information_nodes = find_matching(definition_node,temporary_information),
121121
**additional_parameters
122122
)

0 commit comments

Comments
 (0)