Skip to content

Commit

Permalink
'Refactored by Sourcery'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sourcery AI committed Dec 30, 2023
1 parent 973038c commit eb830b4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pystreamapi/loaders/__xml/__xml_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ def __load_xml_file(file_path, encoding):
"""Load an XML file and convert it into a list of namedtuples."""
# skipcq: PTC-W6004
with open(file_path, mode='r', encoding=encoding) as xmlfile:
src = xmlfile.read()
if src:
if src := xmlfile.read():
return __parse_xml_string(src)
return []

Expand Down

0 comments on commit eb830b4

Please sign in to comment.