We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ef7736e commit bffc37fCopy full SHA for bffc37f
1 file changed
tests/test_synonyms.py
@@ -103,7 +103,9 @@ def test_yaml_loaded_only_via_safe_load():
103
for scan_root in scan_roots:
104
for source_path in sorted(scan_root.rglob("*.py")):
105
relative_path = source_path.relative_to(repo_root).as_posix()
106
- for line_number, line in enumerate(source_path.read_text().splitlines(), 1):
+ for line_number, line in enumerate(
107
+ source_path.read_text(encoding="utf-8").splitlines(), 1
108
+ ):
109
if unsafe_load_call.search(line) or unsafe_loader_name.search(line):
110
violations.append(f"{relative_path}:{line_number}: unsafe YAML load")
111
if source_path.is_relative_to(src_root) and safe_load_call.search(line):
0 commit comments