summaryrefslogtreecommitdiff
path: root/sc/qa/uitest
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 /sc/qa/uitest
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 'sc/qa/uitest')
-rw-r--r--sc/qa/uitest/autofilter/autofilterBugs.py4
-rw-r--r--sc/qa/uitest/calc_tests/goToSheet.py2
-rw-r--r--sc/qa/uitest/calc_tests7/tdf150044.py2
-rw-r--r--sc/qa/uitest/calc_tests9/tdf149529.py1
-rw-r--r--sc/qa/uitest/chart/tdf93506_trendline.py2
-rw-r--r--sc/qa/uitest/chart/tdf98690.py2
-rw-r--r--sc/qa/uitest/pasteSpecial/tdf118308.py1
-rw-r--r--sc/qa/uitest/range_name/tdf150307.py1
8 files changed, 5 insertions, 10 deletions
diff --git a/sc/qa/uitest/autofilter/autofilterBugs.py b/sc/qa/uitest/autofilter/autofilterBugs.py
index a295c6307793..100ceaf246f1 100644
--- a/sc/qa/uitest/autofilter/autofilterBugs.py
+++ b/sc/qa/uitest/autofilter/autofilterBugs.py
@@ -26,7 +26,7 @@ class autofilter(UITestCase):
self.assertEqual(calc_doc.getPropertyValue("UnnamedDatabaseRanges").getByTable(0).AutoFilter, True)
def test_tdf123095(self):
- with self.ui_test.create_doc_in_start_center("calc") as document:
+ with self.ui_test.create_doc_in_start_center("calc"):
calcDoc = self.xUITest.getTopFocusWindow()
xGridWindow = calcDoc.getChild("grid_window")
enter_text_to_cell(xGridWindow, "A1", "乙二醇(进口料件)")
@@ -46,7 +46,7 @@ class autofilter(UITestCase):
self.assertEqual(get_state_as_dict(xTreeList.getChild("1"))["Text"], "乙二醇(进口料件)")
def test_tdf125363(self):
- with self.ui_test.create_doc_in_start_center("calc") as document:
+ with self.ui_test.create_doc_in_start_center("calc"):
calcDoc = self.xUITest.getTopFocusWindow()
xGridWindow = calcDoc.getChild("grid_window")
enter_text_to_cell(xGridWindow, "A1", "guet")
diff --git a/sc/qa/uitest/calc_tests/goToSheet.py b/sc/qa/uitest/calc_tests/goToSheet.py
index ab2311374b71..f77fb24e8856 100644
--- a/sc/qa/uitest/calc_tests/goToSheet.py
+++ b/sc/qa/uitest/calc_tests/goToSheet.py
@@ -12,7 +12,7 @@ from libreoffice.uno.propertyvalue import mkPropertyValues
class goToSheet(UITestCase):
def test_go_to_sheet(self):
- with self.ui_test.create_doc_in_start_center("calc") as document:
+ with self.ui_test.create_doc_in_start_center("calc"):
xCalcDoc = self.xUITest.getTopFocusWindow()
xGridWindow = xCalcDoc.getChild("grid_window")
diff --git a/sc/qa/uitest/calc_tests7/tdf150044.py b/sc/qa/uitest/calc_tests7/tdf150044.py
index 6e42358d7b81..6f70eccc7921 100644
--- a/sc/qa/uitest/calc_tests7/tdf150044.py
+++ b/sc/qa/uitest/calc_tests7/tdf150044.py
@@ -8,8 +8,6 @@
#
from uitest.framework import UITestCase
from libreoffice.uno.propertyvalue import mkPropertyValues
-from org.libreoffice.unotest import systemPathToFileUrl
-from uitest.uihelper.common import select_by_text
from tempfile import TemporaryDirectory
import os.path
diff --git a/sc/qa/uitest/calc_tests9/tdf149529.py b/sc/qa/uitest/calc_tests9/tdf149529.py
index 59f6826e3332..afd355da5f82 100644
--- a/sc/qa/uitest/calc_tests9/tdf149529.py
+++ b/sc/qa/uitest/calc_tests9/tdf149529.py
@@ -9,7 +9,6 @@
from uitest.framework import UITestCase
from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
-from uitest.uihelper.common import select_by_text
from libreoffice.uno.propertyvalue import mkPropertyValues
from libreoffice.calc.document import get_cell_by_position
diff --git a/sc/qa/uitest/chart/tdf93506_trendline.py b/sc/qa/uitest/chart/tdf93506_trendline.py
index 2c4ba720601c..a70a75a922b8 100644
--- a/sc/qa/uitest/chart/tdf93506_trendline.py
+++ b/sc/qa/uitest/chart/tdf93506_trendline.py
@@ -17,7 +17,7 @@ from libreoffice.uno.propertyvalue import mkPropertyValues
# test all dialog items - trend Line dialog
class tdf93506(UITestCase):
def test_tdf93506_chart_trendline_dialog(self):
- with self.ui_test.load_file(get_url_for_data_file("tdf93506.ods")) as calc_doc:
+ with self.ui_test.load_file(get_url_for_data_file("tdf93506.ods")):
xCalcDoc = self.xUITest.getTopFocusWindow()
gridwin = xCalcDoc.getChild("grid_window")
diff --git a/sc/qa/uitest/chart/tdf98690.py b/sc/qa/uitest/chart/tdf98690.py
index f772c4e6d12a..8cd6b82c0359 100644
--- a/sc/qa/uitest/chart/tdf98690.py
+++ b/sc/qa/uitest/chart/tdf98690.py
@@ -13,7 +13,7 @@ from uitest.uihelper.common import get_url_for_data_file
class tdf98690(UITestCase):
def test_tdf98690(self):
- with self.ui_test.load_file(get_url_for_data_file("tdf98690.xlsx")) as calc_doc:
+ with self.ui_test.load_file(get_url_for_data_file("tdf98690.xlsx")):
xCalcDoc = self.xUITest.getTopFocusWindow()
gridwin = xCalcDoc.getChild("grid_window")
diff --git a/sc/qa/uitest/pasteSpecial/tdf118308.py b/sc/qa/uitest/pasteSpecial/tdf118308.py
index 0c0f3689b742..68c462414b01 100644
--- a/sc/qa/uitest/pasteSpecial/tdf118308.py
+++ b/sc/qa/uitest/pasteSpecial/tdf118308.py
@@ -7,7 +7,6 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
from uitest.framework import UITestCase
-from uitest.uihelper.common import get_state_as_dict
from libreoffice.uno.propertyvalue import mkPropertyValues
from uitest.uihelper.calc import enter_text_to_cell
from libreoffice.calc.document import get_cell_by_position
diff --git a/sc/qa/uitest/range_name/tdf150307.py b/sc/qa/uitest/range_name/tdf150307.py
index 30d0e15a60e7..056445408fce 100644
--- a/sc/qa/uitest/range_name/tdf150307.py
+++ b/sc/qa/uitest/range_name/tdf150307.py
@@ -44,7 +44,6 @@ class tdf150307(UITestCase):
with self.ui_test.create_doc_in_start_center("calc"):
xCalcDoc = self.xUITest.getTopFocusWindow()
xGridWin = xCalcDoc.getChild("grid_window")
- xPosWindow = xCalcDoc.getChild('pos_window')
self.xUITest.executeCommand(".uno:Sidebar")