| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Add some small diverse type hints. Type hints make RDFLib safer to use
and change, as changes and usage can be validated using static
analysers like mypy.
This change does not have a runtime impact.
|
| |
|
|
|
| |
Since the names of empty graphs do not appear in the serialization, do not consider them for namespace issues.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The TriG serializer was only considering BNode references inside a single
graph and not counting the BNodes subjects as references when considering if a
BNode should be serialized as unlabeled blank nodes (i.e. `[ ]`), and as a
result it was serializing BNodes as unlabeled if they were in fact referencing
BNodes in other graphs.
One caveat of this change is that some RDF Datasets may be serialized
less succinctly in that unlabeled blank nodes would not be used nodes where it is
technically possible to use them. This can be trivially fixed, but a trivial fix
increases the computational complexity of serialization significantly.
Other changes:
- Removed the roundtrip xfail that this change fixed.
- Added another roundtrip test which has various combinations of BNode
references across graphs in a dataset, this test fails for JSON-LD
however, so while this change removes one xfail it also now adds
another.
- Set the default indent_size and style in `.editorconfig` as to avoid
relying on undefined system defaults.
|
|
|
|
| |
for more information, see https://pre-commit.ci
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds as much typing as possible to `rdflib.term`.
Other changes:
- Added back `warn_unused_ignores`. I actually thought this was enabled
but I forgot I disabled it because of some issue on python 3.10.
- Disabled `warn_unused_ignores` only for `rdflib.plugin`. There is an
ignore in this module which is not needed on python 3.10, this is the
most targetted way to avoid having that fail the type checking that I
can think of for now.
- Removed unused type ignores.
This changeset includes no runtime changes.
|
| |
|
|
|
|
|
|
|
| |
This commit only adds type hints and comments and does not make any changes that
should affect runtime.
The type hints added here derive from work done for #1418.
|
|
|
|
| |
Signed-off-by: t0b3 <thomas.bettler@gmail.com>
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Added RDF/XML, TriX & 1/2 TriG (incomplete)
|
|
|
|
|
|
|
|
| |
opinions is mainly: no to long lines, but not at any cost.
notation3.py crashses autopep :D
Also rdflib/__init__.py gets completely broken
|
|
|
|
| |
now six is used throughout.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Before: "<short:name> {...}" and "<None> {...}"
After: "short:name {...}" and "<http://actual/uri/here> {...}"
|
| |
|
| |
|
|
|
|
|
| |
This was allowed in earlier TriG drafts, but was since removed and is
not allowed by the final W3C Recommendation.
|
| |
|
| |
|
|
|
|
|
|
| |
this fixes the bug reporting in #317
also removed redundant trig test.
|
|
|
|
|
|
|
| |
Also cleaned up N3 parser a bit, and added a Turtle flag, so that
special N3 features are not accepted when parsing as turtle.
Fixes #273 - now we should add some tests :)
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
$ flake8 rdflib --exclude=pyRdfa,host,extras,transform,rdfs,pyMicrodata
rdflib/graph.py:192: W801 redefinition of unused 'BytesIO' from line 189
rdflib/graph.py:194: W402 'BytesIO' imported but unused
rdflib/graph.py:680:80: E501 line too long (80 > 79 characters)
rdflib/graph.py:682:80: E501 line too long (80 > 79 characters)
rdflib/graph.py:686:80: E501 line too long (83 > 79 characters)
rdflib/graph.py:690:80: E501 line too long (83 > 79 characters)
rdflib/graph.py:692:80: E501 line too long (83 > 79 characters)
rdflib/graph.py:695:80: E501 line too long (83 > 79 characters)
rdflib/graph.py:698:80: E501 line too long (83 > 79 characters)
rdflib/parser.py:21: W801 redefinition of unused 'BytesIO' from line 19
rdflib/compat.py:12: W801 redefinition of unused 'defaultdict' from line 10
rdflib/py3compat.py:10: W801 redefinition of unused 'wraps' from line 7
rdflib/py3compat.py:81: W806 redefinition of function 'b' from line 44
rdflib/py3compat.py:87: W806 redefinition of function 'format_doctest_out' from line 50
rdflib/py3compat.py:97: W806 redefinition of function 'type_cmp' from line 61
rdflib/term.py:54: W801 redefinition of unused 'md5' from line 52
rdflib/store.py:73: W801 redefinition of unused 'BytesIO' from line 71
rdflib/query.py:10: W801 redefinition of unused 'BytesIO' from line 8
rdflib/__init__.py:73: W402 'plugin' imported but unused
rdflib/__init__.py:74: W402 'query' imported but unused
rdflib/util.py:43: W806 redefinition of function 'sign' from line 50
rdflib/plugins/parsers/hturtle.py:25: W801 redefinition of unused 'html5lib' from line 24
rdflib/plugins/parsers/ntriples.py:141: W402 'BytesIO' imported but unused
rdflib/plugins/parsers/structureddata.py:23: W801 redefinition of unused 'html5lib' from line 22
|
|\
| |
| |
| |
| | |
Fixes #232
I picked my changes over yours when we collided for purely selfish reasons, sorry :)
|
| |
| |
| |
| |
| | |
I added a separate compatibility.py file to put all functions and
classes that provide backward compatibility.
|
|/ |
|
|
|
|
| |
https://github.com/mammadori/rdflib/commit/494429bfad09532b33eee49d197cba997b59f277
|
|
|