From 2976b771c694ddd95a8a395089231d9a35516721 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 18 Apr 2023 18:02:46 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- test/fuzz_rdflib.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/test/fuzz_rdflib.py b/test/fuzz_rdflib.py index 6f6c31808..d51121745 100644 --- a/test/fuzz_rdflib.py +++ b/test/fuzz_rdflib.py @@ -3,12 +3,13 @@ import atheris with atheris.instrument_imports(): - from rdflib import Graph - from rdflib.plugins.parsers.notation3 import BadSyntax - from rdflib.exceptions import ParserError import sys from xml.sax import SAXParseException + from rdflib import Graph + from rdflib.exceptions import ParserError + from rdflib.plugins.parsers.notation3 import BadSyntax + def test_one_input(data): # arbitrary byte 'data' created by atheris that mutates each time @@ -18,8 +19,10 @@ def test_one_input(data): format_list = ["xml", "trix", "turtle", "n3", "nt"] g = Graph() try: - g.parse(format=fdp.PickValueInList(format_list), - data=fdp.ConsumeUnicodeNoSurrogates(fdp.ConsumeIntInRange(1, 100))) + g.parse( + format=fdp.PickValueInList(format_list), + data=fdp.ConsumeUnicodeNoSurrogates(fdp.ConsumeIntInRange(1, 100)), + ) # Data generated is not appropriate, so ignore BadSyntax, SAXParseException and ParserError except (BadSyntax, SAXParseException, ParserError): pass