File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
src/spdx_tools/spdx/parser Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 1212import logging
1313
1414from spdx_tools .spdx .formats import FileFormat , file_name_to_format
15+ from spdx_tools .spdx .model import Document
1516from spdx_tools .spdx .parser .json import json_parser
1617from spdx_tools .spdx .parser .rdf import rdf_parser
1718from spdx_tools .spdx .parser .tagvalue import tagvalue_parser
1819from spdx_tools .spdx .parser .xml import xml_parser
1920from spdx_tools .spdx .parser .yaml import yaml_parser
2021
2122
22- def parse_file (file_name : str , encoding : str = "utf-8" ):
23+ def parse_file (file_name : str , encoding : str = "utf-8" ) -> Document :
2324 if encoding != "utf-8" :
2425 logging .warning (
2526 "It's recommended to use the UTF-8 encoding for any SPDX file. Consider changing the encoding of the file."
You can’t perform that action at this time.
0 commit comments