Skip to content

Commit 208ef69

Browse files
committed
fix: using [] literals
1 parent 9bc8b51 commit 208ef69

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app/internal/import_file.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def import_txt_file(txt_file: str) -> List[Dict[str, Union[str, Any]]]:
118118
for event in events:
119119
if (not is_event_text_valid(event) or
120120
not save_calendar_content_txt(event, calendar_content)):
121-
return list()
121+
return []
122122
return calendar_content
123123

124124

@@ -127,7 +127,7 @@ def open_ics(ics_file: str) -> Union[List, Calendar]:
127127
try:
128128
calendar_read = Calendar.from_ical(ics.read())
129129
except (IndexError, ValueError):
130-
return list()
130+
return []
131131
return calendar_read
132132

133133

@@ -155,13 +155,13 @@ def import_ics_file(ics_file: str) -> List[Dict[str, Union[str, Any]]]:
155155
calendar_content = []
156156
calendar_read = open_ics(ics_file)
157157
if not calendar_read:
158-
return list()
158+
return []
159159
for component in calendar_read.walk():
160160
if component.name == DESC_EVENT:
161161
if is_valid_data_event_ics(component):
162162
save_calendar_content_ics(component, calendar_content)
163163
else:
164-
return list()
164+
return []
165165
return calendar_content
166166

167167

0 commit comments

Comments
 (0)