sc: fix issues found by Ruff linter
Change-Id: I6710db13549c42e9ae7231e0434a26b6357083e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171102 Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
This commit is contained in:
parent
2c3bf9471d
commit
5373679b69
7 changed files with 7 additions and 14 deletions
|
@ -9,13 +9,12 @@
|
|||
from uitest.framework import UITestCase
|
||||
from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
|
||||
from libreoffice.uno.propertyvalue import mkPropertyValues
|
||||
from libreoffice.calc.document import get_cell_by_position
|
||||
|
||||
class tdf158440(UITestCase):
|
||||
|
||||
def test_tdf158440(self):
|
||||
|
||||
with self.ui_test.load_file(get_url_for_data_file("tdf158440.ods")) as calc_doc:
|
||||
with self.ui_test.load_file(get_url_for_data_file("tdf158440.ods")):
|
||||
|
||||
xCalcDoc = self.xUITest.getTopFocusWindow()
|
||||
gridwin = xCalcDoc.getChild("grid_window")
|
||||
|
|
|
@ -14,7 +14,7 @@ class tdf161457(UITestCase):
|
|||
|
||||
def test_tdf161457(self):
|
||||
|
||||
with self.ui_test.load_file(get_url_for_data_file("tdf161457.ods")) as calc_doc:
|
||||
with self.ui_test.load_file(get_url_for_data_file("tdf161457.ods")):
|
||||
|
||||
xCalcDoc = self.xUITest.getTopFocusWindow()
|
||||
xGridWin = xCalcDoc.getChild("grid_window")
|
||||
|
|
|
@ -7,10 +7,7 @@
|
|||
# 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 uitest.uihelper.common import select_by_text, select_pos
|
||||
from libreoffice.calc.document import get_cell_by_position
|
||||
|
||||
from libreoffice.uno.propertyvalue import mkPropertyValues
|
||||
|
||||
class tdf115474(UITestCase):
|
||||
|
|
|
@ -9,9 +9,6 @@
|
|||
from uitest.framework import UITestCase
|
||||
from uitest.uihelper.common import get_url_for_data_file
|
||||
|
||||
from libreoffice.uno.propertyvalue import mkPropertyValues
|
||||
from com.sun.star.beans import PropertyValue
|
||||
|
||||
class tdf159707(UITestCase):
|
||||
|
||||
def test_tdf159707(self):
|
||||
|
|
|
@ -225,8 +225,8 @@ class chartDataLabels(UITestCase):
|
|||
sourceformat = dialog.getChild("sourceformat")
|
||||
|
||||
# Select currency
|
||||
sourceformat.executeAction("CLICK", tuple());
|
||||
categoryformat.getChild("4").executeAction("SELECT", tuple());
|
||||
sourceformat.executeAction("CLICK", tuple())
|
||||
categoryformat.getChild("4").executeAction("SELECT", tuple())
|
||||
|
||||
self.assertEqual(get_state_as_dict(categoryformat)["SelectEntryText"], "Currency")
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ class tdf158110(UITestCase):
|
|||
self.assertEqual("Comment 1", get_cell_by_position(document, 0, 1, 0).Annotation.String)
|
||||
|
||||
def test_tdf158110_paste_special_overwrite_comments(self):
|
||||
with self.ui_test.create_doc_in_start_center("calc") as document:
|
||||
with self.ui_test.create_doc_in_start_center("calc"):
|
||||
xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window")
|
||||
|
||||
# Insert a comments
|
||||
|
|
|
@ -39,7 +39,7 @@ class LocaleData(object):
|
|||
self.funcList = {}
|
||||
|
||||
def addKeywordMap (self, funcName, localeName, engName):
|
||||
if not funcName in self.funcList:
|
||||
if funcName not in self.funcList:
|
||||
self.funcList[funcName] = []
|
||||
|
||||
self.funcList[funcName].append([localeName, engName])
|
||||
|
@ -118,7 +118,7 @@ class Parser(object):
|
|||
bl = self.bytes[self.i+1]
|
||||
try:
|
||||
dbyte = ord(bl)*256 + ord(bh)
|
||||
except:
|
||||
except Exception:
|
||||
dbyte = bl*256 + bh
|
||||
self.i += 2
|
||||
return dbyte
|
||||
|
|
Loading…
Reference in a new issue