Skip to content

Commit 6e28571

Browse files
committed
fix linter error
1 parent a2fe317 commit 6e28571

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cs2tracker/app/editor_frame.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ def _get_insert_index(self, item_name, section, by_year=False):
416416
if year(item_name) == year(existing_item_name) and item_name < existing_item_name:
417417
insert_index = existing_item_index
418418
break
419-
elif year(item_name) < year(existing_item_name):
419+
if year(item_name) < year(existing_item_name):
420420
insert_index = existing_item_index
421421
break
422422
else:
@@ -766,5 +766,5 @@ def _cleanup(self):
766766

767767
def year(name):
768768
"""A utility function to extract the year from an item name."""
769-
year = re.search(r"\b(\d{4})\b", name)
770-
return int(year.group()) if year else 0
769+
year_match = re.search(r"\b(\d{4})\b", name)
770+
return int(year_match.group()) if year_match else 0

0 commit comments

Comments
 (0)