[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
pull/70/head
pre-commit-ci[bot] 2 years ago
parent 8ec7fea0a4
commit 3249738620

@ -16,10 +16,16 @@ def har_archive_heuristic(file_path: str) -> int:
with open(file_path, "rb") as f: with open(file_path, "rb") as f:
data = f.read(2048) data = f.read(2048)
# if file contains only ascii characters after remove EOL characters # if file contains only ascii characters after remove EOL characters
if data.decode("utf-8", "ignore").replace("\r", "").replace("\n", "").isprintable() is True: if (
data.decode("utf-8", "ignore")
.replace("\r", "")
.replace("\n", "")
.isprintable()
is True
):
val += 25 val += 25
# sign of a JSON file # sign of a JSON file
if data[0:1] == b'{': if data[0:1] == b"{":
val += 23 val += 23
# sign of Chrome OR Firefox export # sign of Chrome OR Firefox export
if b'"WebInspector"' in data or b'"Firefox"' in data: if b'"WebInspector"' in data or b'"Firefox"' in data:

Loading…
Cancel
Save