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 9e76342 commit 4f34e79
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 4f34e79

Please sign in to comment.