From 09ba0057e3d7f8c9d1166269b232a8b2692fa506 Mon Sep 17 00:00:00 2001 From: Rakielle Date: Sat, 15 Oct 2022 20:19:33 +0100 Subject: tdf#132293 remove unused imports and variables I used pyflakes to check for any unused imports and variables in python scripts under sc, sw, uitest directories, and then removed the unused imports and variables Change-Id: I0690c9366087dc602ee8ea169bc1c9063033fef6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141421 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas Reviewed-by: Xisco Fauli --- sw/qa/python/check_styles.py | 10 +++++----- sw/qa/python/text_portion_enumeration_test.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'sw/qa/python') diff --git a/sw/qa/python/check_styles.py b/sw/qa/python/check_styles.py index d19f9850b445..113fd801593c 100644 --- a/sw/qa/python/check_styles.py +++ b/sw/qa/python/check_styles.py @@ -103,21 +103,21 @@ class CheckStyle(unittest.TestCase): xFamily.removeByName(xRightStyle2.Name) with self.assertRaises(NoSuchElementException): - nope = xFamily.getByName("RightStyleOld") + xFamily.getByName("RightStyleOld") with self.assertRaises(NoSuchElementException): - nope = xFamily.getByName("RightStyle") + xFamily.getByName("RightStyle") with self.assertRaises(NoSuchElementException): - nope = xFamily.getByName("RightStyle2Old") + xFamily.getByName("RightStyle2Old") with self.assertRaises(NoSuchElementException): - nope = xFamily.getByName("RightStyle2") + xFamily.getByName("RightStyle2") with self.assertRaises(IllegalArgumentException): xFamily.insertByName("WrongStyle", xWrongStyle) with self.assertRaises(NoSuchElementException): - nope = xFamily.getByName("WrongStyle") + xFamily.getByName("WrongStyle") def test_CharacterFamily(self): xDoc = CheckStyle._uno.openEmptyWriterDoc() diff --git a/sw/qa/python/text_portion_enumeration_test.py b/sw/qa/python/text_portion_enumeration_test.py index 3de536dc7c8f..c183aaf41b09 100644 --- a/sw/qa/python/text_portion_enumeration_test.py +++ b/sw/qa/python/text_portion_enumeration_test.py @@ -3271,7 +3271,7 @@ class TextPortionEnumerationTest(unittest.TestCase): try: if i_comp: i_comp.close(True) - except Exception as e: + except Exception: pass def test_load_store(self): -- cgit