Skip to content

Commit aee0ecd

Browse files
committed
Simplify code.
1 parent 5af825b commit aee0ecd

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

jrnl/journals/FolderJournal.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,15 +137,11 @@ def _get_files(self, journal_path: str) -> list[str]:
137137
if self.config["extension"] is not None:
138138
EXTENSIONSARRAYLENGTH = len (self.config["extension"])
139139
EXTENSIONARRAY = self.config["extension"]
140-
COUNTER = 0
141140
if EXTENSIONSARRAYLENGTH > 0:
142141
EXTENSIONS = "(txt"
143142
for i in EXTENSIONARRAY:
144-
COUNTER = COUNTER + 1
145-
if COUNTER < EXTENSIONSARRAYLENGTH:
146-
EXTENSIONS = EXTENSIONS + "|" + i
147-
else:
148-
EXTENSIONS = EXTENSIONS + "|" + i + ")"
143+
EXTENSIONS = EXTENSIONS + "|" + i
144+
EXTENSIONS = EXTENSIONS + ")"
149145
else:
150146
EXTENSIONS = "(txt)"
151147
for year_folder in Folder._get_year_folders(pathlib.Path(journal_path)):

0 commit comments

Comments
 (0)