|
Download tasks/codeql_python_benchmark51_v2/pyvul-7c7eaf17f0df49603ae4/pre_context.md from Benchanything/checkerbench: direct link, hf CLI and curl.
- Browser
- Download file 989 Bytes
-
https://huggingface.co/datasets/Benchanything/checkerbench/resolve/main/tasks/codeql_python_benchmark51_v2/pyvul-7c7eaf17f0df49603ae4/pre_context.md
- Command line
-
hf download hf://datasets/Benchanything/checkerbench/tasks/codeql_python_benchmark51_v2/pyvul-7c7eaf17f0df49603ae4/pre_context.md
-
curl -L -o pre_context.md https://huggingface.co/datasets/Benchanything/checkerbench/resolve/main/tasks/codeql_python_benchmark51_v2/pyvul-7c7eaf17f0df49603ae4/pre_context.md
989 Bytes
Patch-overlapping Python context before the fix
pyanyapi/interfaces.py — class:YAMLInterface (lines 272-279)
class YAMLInterface(DictInterface):
_error_message = 'YAML data can not be parsed.'
def perform_parsing(self):
try:
return yaml.load(self.content)
except yaml.error.YAMLError:
raise ResponseParseError(self._error_message, self.content)
pyanyapi/interfaces.py — function:YAMLInterface.perform_parsing (lines 275-279)
def perform_parsing(self):
try:
return yaml.load(self.content)
except yaml.error.YAMLError:
raise ResponseParseError(self._error_message, self.content)
tests/test_parsers.py — function:test_xml_parsed (lines 66-76)
def test_xml_parsed(settings):
parsed = XMLParser(settings).parse(XML_CONTENT)
assert parsed.success == ['1']
assert parsed.parse('string(//id/text())') == '32e9a4a2'