fuzz-bootspec: apply "ruff format"
This also replaces open().read() with Path().read_text(). Co-authored-by: Jörg Behrmann <behrmann@physik.fu-berlin.de>
This commit is contained in:
co-authored by
Jörg Behrmann
parent
a89c11b672
commit
c5abf64d37
@@ -4,14 +4,12 @@
|
||||
"""Generate sample input for fuzz-bootspec"""
|
||||
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
config = open(sys.argv[1]).read()
|
||||
loader = [entry for entry in open(sys.argv[2], encoding='utf-16-le').read().split('\0')
|
||||
if len(entry) > 2] # filter out fluff from bad decoding
|
||||
entries = [(os.path.basename(name), open(name).read())
|
||||
for name in sys.argv[3:]]
|
||||
config = Path(sys.argv[1]).read_text()
|
||||
loader = [entry for entry in Path(sys.argv[2]).read_text(encoding='utf-16-le').split('\0') if len(entry) > 2]
|
||||
entries = [(Path(name).name, Path(name).read_text()) for name in sys.argv[3:]]
|
||||
|
||||
data = {
|
||||
'config': config,
|
||||
|
||||
Reference in New Issue
Block a user