EMMC-ASBL / tripper

Triplestore wrapper package for Python.
https://EMMC-ASBL.github.io/tripper
MIT License
7 stars 2 forks source link

Added a fix for parsing rdflib literals. #229

Closed jesper-friis closed 4 months ago

jesper-friis commented 4 months ago

Description

We cannot use the value attribute of an rdflib.Literal to access its value, since it is None for some datatypes (at least for rdf:JSON). Seems more robust to use the existence of the n3() method to test for a literal and the string representation to access its value.

Type of change

Checklist for the reviewer

This checklist should be used as a help for the reviewer.

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 78.44%. Comparing base (225fc78) to head (0a1da48).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #229 +/- ## ========================================== + Coverage 78.41% 78.44% +0.02% ========================================== Files 18 18 Lines 1696 1698 +2 ========================================== + Hits 1330 1332 +2 Misses 366 366 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.