From 4de4f97c7562b96cb4450c8f25c130fc841ed1da Mon Sep 17 00:00:00 2001 From: Casper Welzel Andersen Date: Fri, 17 Sep 2021 11:57:42 +0200 Subject: [PATCH] Satisfy flake8 --- ontopy/utils.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ontopy/utils.py b/ontopy/utils.py index 09676a124..7615a9b17 100644 --- a/ontopy/utils.py +++ b/ontopy/utils.py @@ -43,7 +43,6 @@ class UnknownVersion(Exception): """Cannot retrieve version from a package.""" - def isinteractive(): """Returns true if we are running from an interactive interpreater, false otherwise.""" @@ -362,7 +361,9 @@ def _validate_installed_version( """ import importlib - from packaging.version import parse as parse_version, LegacyVersion, Version + from packaging.version import ( + parse as parse_version, LegacyVersion, Version + ) if isinstance(min_version, str): min_version = parse_version(min_version) @@ -537,7 +538,9 @@ def recur(g): recur(graph) if output: if ( - not _validate_installed_version(package="rdflib", min_version="6.0.0") + not _validate_installed_version( + package="rdflib", min_version="6.0.0" + ) and ( output_format == FMAP.get("ttl", "") or os.path.splitext(output)[1] == "ttl" @@ -549,7 +552,8 @@ def recur(g): "To correctly convert to Turtle format, rdflib must be version" " 6.0.0 or greater, however, the detected rdflib version used " f"by your Python interpreter is {__rdflib_version__!r}. For " - "more information see the 'Known issues' section of the README." + "more information see the 'Known issues' section of the " + "README." ) graph.serialize(destination=output, format=output_format)