From 5647007f95a52d79d42c064e7b93be45dc966dfe Mon Sep 17 00:00:00 2001 From: Ruben Date: Wed, 26 Feb 2025 14:32:33 +0100 Subject: [PATCH] fix typecheck for sparql_escape_float --- escape_helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/escape_helpers.py b/escape_helpers.py index 7b36c08..8776a6c 100644 --- a/escape_helpers.py +++ b/escape_helpers.py @@ -53,7 +53,7 @@ def sparql_escape_int(obj): def sparql_escape_float(obj): """Converts the given float to a SPARQL-safe RDF object string with the right RDF-datatype. """ - if not isinstance(obj, int): + if not isinstance(obj, float): warn("You are escaping something that isn't a float with \ the 'sparql_escape_float'-method. Implicit casting will occurr.") obj = str(float(obj))