File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1515# https://images.webofknowledge.com/images/help/WOS/hs_wos_fieldtags.html
1616
1717
18- def to_string_wos (query : Query , wrap : bool = False ) -> str :
18+ def to_string_wos (query : Query ) -> str :
1919 """Serialize the Query tree into a Web of Science (WoS) search string."""
2020
2121 # Leaf node
@@ -28,14 +28,14 @@ def to_string_wos(query: Query, wrap: bool = False) -> str:
2828 if child .operator and child .value == Operators .NOT :
2929 # Special handling: inject "NOT ..." directly
3030 not_child = child .children [0 ]
31- not_str = to_string_wos (not_child , wrap = True )
31+ not_str = to_string_wos (not_child )
3232 parts .append (f"NOT { not_str } " )
3333 else :
34- parts .append (to_string_wos (child , wrap = True ))
34+ parts .append (to_string_wos (child ))
3535
3636 joined = f" { query .value } " .join (parts )
3737
38- if wrap :
38+ if query . get_parent () :
3939 field = query .search_field .value if query .search_field else ""
4040 return f"{ field } ({ joined } )"
4141
You can’t perform that action at this time.
0 commit comments