提交 ab3d9b32 编写于 作者: K Kentaro Wada

Reformat files with Black 20.8b1

上级 49b1f8f6
......@@ -1032,7 +1032,9 @@ class MainWindow(QtWidgets.QMainWindow):
if shape is None:
return
text, flags, group_id = self.labelDialog.popUp(
text=shape.label, flags=shape.flags, group_id=shape.group_id,
text=shape.label,
flags=shape.flags,
group_id=shape.group_id,
)
if text is None:
return
......@@ -1059,7 +1061,9 @@ class MainWindow(QtWidgets.QMainWindow):
def fileSearchChanged(self):
self.importDirImages(
self.lastOpenDir, pattern=self.fileSearch.text(), load=False,
self.lastOpenDir,
pattern=self.fileSearch.text(),
load=False,
)
def fileSelectionChanged(self):
......@@ -1165,7 +1169,9 @@ class MainWindow(QtWidgets.QMainWindow):
other_data = shape["other_data"]
shape = Shape(
label=label, shape_type=shape_type, group_id=group_id,
label=label,
shape_type=shape_type,
group_id=group_id,
)
for x, y in points:
shape.addPoint(QtCore.QPointF(x, y))
......@@ -1358,7 +1364,8 @@ class MainWindow(QtWidgets.QMainWindow):
self.scrollBars[Qt.Horizontal].value() + x_shift,
)
self.setScroll(
Qt.Vertical, self.scrollBars[Qt.Vertical].value() + y_shift,
Qt.Vertical,
self.scrollBars[Qt.Vertical].value() + y_shift,
)
def setFitWindow(self, value=True):
......@@ -1446,7 +1453,8 @@ class MainWindow(QtWidgets.QMainWindow):
return False
self.imageData = self.labelFile.imageData
self.imagePath = osp.join(
osp.dirname(label_file), self.labelFile.imagePath,
osp.dirname(label_file),
self.labelFile.imagePath,
)
self.otherData = self.labelFile.otherData
else:
......
......@@ -55,7 +55,11 @@ def labelme_on_docker(in_file, out_file):
)
in_file_a = osp.abspath(in_file)
in_file_b = osp.join("/home/developer", osp.basename(in_file))
cmd = cmd.format(ip, in_file_a, in_file_b,)
cmd = cmd.format(
ip,
in_file_a,
in_file_b,
)
if out_file:
out_file_a = osp.abspath(out_file)
out_file_b = osp.join("/home/developer", osp.basename(out_file))
......
......@@ -32,7 +32,9 @@ class ColoredFormatter(logging.Formatter):
def colored(text):
return termcolor.colored(
text, color=COLORS[levelname], attrs={"bold": True},
text,
color=COLORS[levelname],
attrs={"bold": True},
)
record.levelname2 = colored("{:<7}".format(record.levelname))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册