tools-python icon indicating copy to clipboard operation
tools-python copied to clipboard

Add return type Document for parse_file()

Open bact opened this issue 1 year ago • 0 comments

Add a return type to spdx.parser.parse_anything.parse_file function.

Since all parse_from_file() functions from

  • rdf_parser
  • tagvalue_parser
  • json_parser
  • xml_parser and
  • yaml_parser

that parse_file() is calling, are returning Document, it should be safe to declare that parse_file() return Document as well.

This will assist type checking.

bact avatar Nov 26 '24 13:11 bact