Skip to content

Commit

Permalink
Reformating
Browse files Browse the repository at this point in the history
  • Loading branch information
has-abi committed Feb 10, 2024
1 parent 08fc7a5 commit 718c786
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 1 addition & 3 deletions docparser/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
from typing import Tuple


def get_file_name_and_ext(
file_or_filepath: str | BufferedReader
) -> Tuple[str, str]:
def get_file_name_and_ext(file_or_filepath: str | BufferedReader) -> Tuple[str, str]:
"""Extract the file extension and the file name
from a file or a file name.
Expand Down
8 changes: 5 additions & 3 deletions docparser/xml_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,11 @@ def to_xml(self) -> XML_Type:
XML_Type: Dictionary containing
the components content.
"""
xml_parts: XML_Type = {"header": self.get_xml_part_by_pattern(CS.XML_HEADER),
"body": self.__zip_file.read(CS.XML_BODY),
"footer": self.get_xml_part_by_pattern(CS.XML_FOOTER)}
xml_parts: XML_Type = {
"header": self.get_xml_part_by_pattern(CS.XML_HEADER),
"body": self.__zip_file.read(CS.XML_BODY),
"footer": self.get_xml_part_by_pattern(CS.XML_FOOTER),
}
return xml_parts

def get_xml_part_by_pattern(self, pattern: str) -> List[bytes]:
Expand Down

0 comments on commit 718c786

Please sign in to comment.