summaryrefslogtreecommitdiff
path: root/sw/qa/python
diff options
context:
space:
mode:
authorRakielle <rakielledev@gmail.com>2022-10-15 20:19:33 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2022-10-17 13:32:56 +0200
commit09ba0057e3d7f8c9d1166269b232a8b2692fa506 (patch)
tree7daead76f7bb02c8094b6a3160170f10c06817ec /sw/qa/python
parent61f660daef0e9c848087fbc7a8f95395c7093b8f (diff)
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 <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw/qa/python')
-rw-r--r--sw/qa/python/check_styles.py10
-rw-r--r--sw/qa/python/text_portion_enumeration_test.py2
2 files changed, 6 insertions, 6 deletions
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):