From 6f03ce3a21d2d47004a9861d2dc62dc380000077 Mon Sep 17 00:00:00 2001 From: Jitse Niesen Date: Sun, 10 Jun 2018 11:58:07 +0100 Subject: [PATCH] Remove unused variables when initializing localization This fixes a code style warning which suddenly popped up on one of the CI servers. --- spyder_unittest/backend/noserunner.py | 2 +- spyder_unittest/widgets/configdialog.py | 2 +- spyder_unittest/widgets/datatree.py | 2 +- spyder_unittest/widgets/unittestgui.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spyder_unittest/backend/noserunner.py b/spyder_unittest/backend/noserunner.py index e702798f..3ced2055 100644 --- a/spyder_unittest/backend/noserunner.py +++ b/spyder_unittest/backend/noserunner.py @@ -14,7 +14,7 @@ try: _ = get_translation("unittest", dirname="spyder_unittest") -except KeyError as error: +except KeyError: import gettext _ = gettext.gettext diff --git a/spyder_unittest/widgets/configdialog.py b/spyder_unittest/widgets/configdialog.py index 0e396775..e6c6ffc1 100644 --- a/spyder_unittest/widgets/configdialog.py +++ b/spyder_unittest/widgets/configdialog.py @@ -25,7 +25,7 @@ try: _ = get_translation("unittest", dirname="spyder_unittest") -except KeyError as error: +except KeyError: import gettext _ = gettext.gettext diff --git a/spyder_unittest/widgets/datatree.py b/spyder_unittest/widgets/datatree.py index 2525ee51..e749c563 100644 --- a/spyder_unittest/widgets/datatree.py +++ b/spyder_unittest/widgets/datatree.py @@ -23,7 +23,7 @@ try: _ = get_translation("unittest", dirname="spyder_unittest") -except KeyError as error: +except KeyError: import gettext _ = gettext.gettext diff --git a/spyder_unittest/widgets/unittestgui.py b/spyder_unittest/widgets/unittestgui.py index d1c16bf6..894bd0d6 100644 --- a/spyder_unittest/widgets/unittestgui.py +++ b/spyder_unittest/widgets/unittestgui.py @@ -33,7 +33,7 @@ # This is needed for testing this module as a stand alone script try: _ = get_translation("unittest", dirname="spyder_unittest") -except KeyError as error: +except KeyError: import gettext _ = gettext.gettext