Download tasks/codeql_python_benchmark51_v2/pyvul-3187445bcbbf39128a26/patch.diff from Benchanything/checkerbench: direct link, hf CLI and curl.
- Browser
- Download file 1.25 kB
-
https://huggingface.co/datasets/Benchanything/checkerbench/resolve/main/tasks/codeql_python_benchmark51_v2/pyvul-3187445bcbbf39128a26/patch.diff
- Command line
-
hf download hf://datasets/Benchanything/checkerbench/tasks/codeql_python_benchmark51_v2/pyvul-3187445bcbbf39128a26/patch.diff
-
curl -L -o patch.diff https://huggingface.co/datasets/Benchanything/checkerbench/resolve/main/tasks/codeql_python_benchmark51_v2/pyvul-3187445bcbbf39128a26/patch.diff
1.25 kB
| diff --git a/requirements.txt b/requirements.txt | |
| index 7d2f3f5..9d73a97 100644 | |
| --- a/requirements.txt | |
| +++ b/requirements.txt | |
| Markdown==2.6.8 | |
| Pygments==1.6 | |
| Jinja2==2.7.3 | |
| -PyYAML==3.11 | |
| +PyYAML==5.1 | |
| docopt==0.6.1 | |
| ordereddict==1.1 | |
| watchdog==0.8.3 | |
| diff --git a/simiki/config.py b/simiki/config.py | |
| index c0a1ef3..790178b 100644 | |
| --- a/simiki/config.py | |
| +++ b/simiki/config.py | |
| def parse_config(config_file): | |
| default_config = _set_default_config() | |
| with io.open(config_file, "rt", encoding="utf-8") as fd: | |
| - config = yaml.load(fd) | |
| + config = yaml.load(fd, Loader=yaml.FullLoader) | |
| default_config.update(config) | |
| config = _post_process(default_config) | |
| diff --git a/simiki/generators.py b/simiki/generators.py | |
| index 9816df0..148908b 100644 | |
| --- a/simiki/generators.py | |
| +++ b/simiki/generators.py | |
| class PageGenerator(BaseGenerator): | |
| def parse_meta(self, yaml_str): | |
| """Parse meta from yaml string, and validate yaml filed, return dict""" | |
| try: | |
| - meta = yaml.load(yaml_str) | |
| + meta = yaml.load(yaml_str, Loader=yaml.FullLoader) | |
| except yaml.YAMLError as e: | |
| e.extra_msg = 'yaml format error' | |
| raise | |