mirror of
https://github.com/arsenetar/dupeguru.git
synced 2026-01-22 14:41:39 +00:00
Apply pyupgrade changes
This commit is contained in:
@@ -216,7 +216,7 @@ class Columns(GUIObject):
|
||||
self.view.restore_columns()
|
||||
return
|
||||
for col in self.column_list:
|
||||
pref_name = "{}.Columns.{}".format(self.savename, col.name)
|
||||
pref_name = f"{self.savename}.Columns.{col.name}"
|
||||
coldata = self.prefaccess.get_default(pref_name, fallback_value={})
|
||||
if "index" in coldata:
|
||||
col.ordered_index = coldata["index"]
|
||||
@@ -231,7 +231,7 @@ class Columns(GUIObject):
|
||||
if not (self.prefaccess and self.savename and self.coldata):
|
||||
return
|
||||
for col in self.column_list:
|
||||
pref_name = "{}.Columns.{}".format(self.savename, col.name)
|
||||
pref_name = f"{self.savename}.Columns.{col.name}"
|
||||
coldata = {"index": col.ordered_index, "width": col.width}
|
||||
if col.optional:
|
||||
coldata["visible"] = col.visible
|
||||
|
||||
@@ -451,7 +451,7 @@ class Row:
|
||||
"""
|
||||
|
||||
def __init__(self, table):
|
||||
super(Row, self).__init__()
|
||||
super().__init__()
|
||||
self.table = table
|
||||
|
||||
def _edit(self):
|
||||
|
||||
@@ -77,8 +77,7 @@ class Node(MutableSequence):
|
||||
if include_self and predicate(self):
|
||||
yield self
|
||||
for child in self:
|
||||
for found in child.findall(predicate, include_self=True):
|
||||
yield found
|
||||
yield from child.findall(predicate, include_self=True)
|
||||
|
||||
def get_node(self, index_path):
|
||||
"""Returns the node at ``index_path``.
|
||||
|
||||
Reference in New Issue
Block a user