From eaaac39ac6dcf47e95ffe182fc1ec487cae5d134 Mon Sep 17 00:00:00 2001 From: "sourcery-ai[bot]" <58596630+sourcery-ai[bot]@users.noreply.github.com> Date: Tue, 30 Jun 2020 18:30:28 -0700 Subject: [PATCH] Refactored by Sourcery (#1) Co-authored-by: Sourcery AI --- python/incendium/gui.py | 2 +- python/incendium/nav.py | 4 +--- python/system/tag.py | 1 - 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/python/incendium/gui.py b/python/incendium/gui.py index 7a3dab0..500400c 100644 --- a/python/incendium/gui.py +++ b/python/incendium/gui.py @@ -72,7 +72,7 @@ def confirm(message, title, show_cancel=False): return ( not bool(choice) - if choice == JOptionPane.YES_OPTION or choice == JOptionPane.NO_OPTION + if choice in [JOptionPane.YES_OPTION, JOptionPane.NO_OPTION] else None ) diff --git a/python/incendium/nav.py b/python/incendium/nav.py index 1fee470..bec976b 100644 --- a/python/incendium/nav.py +++ b/python/incendium/nav.py @@ -43,9 +43,7 @@ def _get_full_path(from_path, to_path): for path_part in path_parts: if path_part == PARENT_DIRECTORY and len(full_path): full_path = full_path[:-1] - elif path_part == CURRENT_DIRECTORY: - pass - else: + elif path_part != CURRENT_DIRECTORY: full_path.append(path_part) return '/'.join(full_path) diff --git a/python/system/tag.py b/python/system/tag.py index e1a42cd..c41242f 100644 --- a/python/system/tag.py +++ b/python/system/tag.py @@ -376,7 +376,6 @@ def queryTagCalculations(paths, calculations, print (paths, calculations, startDate, endDate, rangeHours, rangeMinutes, aliases, includeBoundingValues, validatesSCExec, noInterpolation, ignoreBadQuality) - pass def read(tagPath):