Skip to content

Commit 55718ed

Browse files
committed
minor refactor
1 parent 46935dc commit 55718ed

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

inputremapper/gui/data_manager.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,11 @@ def set_autoload(self, status: bool):
231231
def get_newest_group_key(self) -> GroupKey:
232232
"""group_key of the group with the most recently modified preset."""
233233
paths = []
234-
for path in glob.glob(os.path.join(glob.escape(PathUtils.get_preset_path()), "*/*.json",)):
234+
pattern = os.path.join(
235+
glob.escape(PathUtils.get_preset_path()),
236+
"*/*.json",
237+
)
238+
for path in glob.glob(pattern):
235239
if self._reader_client.groups.find(key=PathUtils.split_all(path)[-2]):
236240
paths.append((path, os.path.getmtime(path)))
237241

@@ -249,7 +253,10 @@ def get_newest_preset_name(self) -> Name:
249253
paths = [
250254
(path, os.path.getmtime(path))
251255
for path in glob.glob(
252-
os.path.join(glob.escape(PathUtils.get_preset_path(self.active_group.name)), "*.json",)
256+
os.path.join(
257+
glob.escape(PathUtils.get_preset_path(self.active_group.name)),
258+
"*.json",
259+
)
253260
)
254261
]
255262
if not paths:

0 commit comments

Comments
 (0)