Skip to content

Commit 17db5bc

Browse files
authored
Merge pull request #32 from x-m-el/fix/escape-float-helper-warning
Fix typecheck for sparql_escape_float
2 parents 01a4f43 + 5647007 commit 17db5bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

escape_helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def sparql_escape_int(obj):
5353

5454
def sparql_escape_float(obj):
5555
"""Converts the given float to a SPARQL-safe RDF object string with the right RDF-datatype. """
56-
if not isinstance(obj, int):
56+
if not isinstance(obj, float):
5757
warn("You are escaping something that isn't a float with \
5858
the 'sparql_escape_float'-method. Implicit casting will occurr.")
5959
obj = str(float(obj))

0 commit comments

Comments
 (0)