Skip to content

Commit c944019

Browse files
Simplify boolean logic
Co-authored-by: Florentin Dörre <[email protected]>
1 parent 84e7a99 commit c944019

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

graphdatascience/query_runner/neo4j_query_runner.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,7 @@ def run_cypher_query() -> DataFrame:
187187
return run_cypher_query()
188188

189189
def _resolve_show_progress(self, show_progress: bool) -> bool:
190-
if self._show_progress is False:
191-
return False
192-
193-
return show_progress
190+
return self._show_progress and show_progress
194191

195192
def server_version(self) -> ServerVersion:
196193
if self._server_version:

graphdatascience/query_runner/session_query_runner.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,10 +210,7 @@ def run_write_back():
210210
return gds_write_result
211211

212212
def _resolve_show_progress(self, show_progress: bool) -> bool:
213-
if self._show_progress is False:
214-
return False
215-
216-
return show_progress
213+
return self._show_progress and show_progress
217214

218215
def _inject_arrow_config(self, params: Dict[str, Any]) -> None:
219216
host, port = self._gds_arrow_client.connection_info()

0 commit comments

Comments
 (0)