The vulntotal_cli.py module currently imports and uses the standard yaml library, but there's a TODO comment (line 20) noting that it should be replaced with saneyaml. The project already includes saneyaml as a dependency (version 0.6.0 in requirements.txt) and uses it consistently throughout the codebase in other modules.
The task is
- To replace
import yaml with import saneyaml in vulntotal_cli.py,
- Replace
yaml.dump() calls with saneyaml.dump()
- Followed by a clean up of the TODO comment
- Running existing test to verify that the YAML output functionality still works
This is important because:
- It would maintain codebase consistency
- sanyaml produces better and more readable yaml formatting
- It will reduce dependency on multiple yaml libraries
cc @TG1999 @ziadhany @pombredanne
The vulntotal_cli.py module currently imports and uses the standard yaml library, but there's a TODO comment (line 20) noting that it should be replaced with saneyaml. The project already includes saneyaml as a dependency (version 0.6.0 in requirements.txt) and uses it consistently throughout the codebase in other modules.
The task is
import yamlwithimport saneyamlin vulntotal_cli.py,yaml.dump()calls withsaneyaml.dump()This is important because:
cc @TG1999 @ziadhany @pombredanne