summaryrefslogtreecommitdiff
path: root/rdflib/plugins/serializers/rdfxml.py
Commit message (Collapse)AuthorAgeFilesLines
* fix: eliminate bare `except:` (#2350)Iwan Aucamp2023-04-121-1/+1
| | | | | | | | | | | Replace bare `except:` with `except Exception`, there are some cases where it can be narrowed further, but this is already an improvement over the current situation. This is somewhat pursuant to eliminating [flakeheaven](https://github.com/flakeheaven/flakeheaven), as it no longer supports the latest version of flake8 [[ref](https://github.com/flakeheaven/flakeheaven/issues/132)]. But it also is just the right thing to do as bare exceptions can cause problems.
* feat: add typing to `rdflib.util` (#2262)Iwan Aucamp2023-03-121-1/+2
| | | | | | | | Mainly so that users can use RDFLib in a safer way, and that we can make safer changes to RDFLib in future. There are also some accomodating type-hint related changes outside of `rdflib.util`. This change does not have a runtime impact.
* build(deps-dev): bump black from 22.12.0 to 23.1.0 (#2248)dependabot[bot]2023-03-111-4/+0
|
* More type hints for `rdflib.graph` and related (#1853)Iwan Aucamp2022-05-261-3/+6
| | | | | | | | | | | | | | | | | | This patch primarily adds more type hints for `rdflib.graph`, but also adds type hints to some related modules in order to work with the new type hints for `rdflib.graph`. I'm mainly doing this as a baseline for adding type hints to `rdflib.store`. I have created type aliases to make it easier to type everything consistently and to make type hints easier easier to change in the future. The type aliases are private however (i.e. `_`-prefixed) and should be kept as such for now. This patch only contains typing changes and does not change runtime behavior. Broken off from https://github.com/RDFLib/rdflib/pull/1850
* [pre-commit.ci] auto fixes from pre-commit.com hookspre-commit-ci[bot]2022-04-151-10/+8
| | | | for more information, see https://pre-commit.ci
* [pre-commit.ci] auto fixes from pre-commit.com hookspre-commit-ci[bot]2022-02-231-1/+3
| | | | for more information, see https://pre-commit.ci
* Remove unused type ignoresIwan Aucamp2022-02-231-2/+2
|
* Fix type checking errorsIwan Aucamp2022-02-221-3/+1
| | | | | | | | | | | | Type checking passes now. I also included some changes which reduces the footprint of this change so that it becomes almost entirely just change of type annotations. This may be a bit on the pendatic side, and I would be fine if you keep the changes as they were, but I would rather keep refactoring seperate from changes to add typing.
* Apply IdentifiedNode type signature revisions to rdf-xml serializerAlex Nelson2022-01-251-4/+6
| | | | | | | | | | This resolves type signature issues raised in the prior patch, but might require a follow-on patch depending on `Path` discussion. References: * https://github.com/RDFLib/rdflib/issues/1696 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
* Flak8 improvementsnicholascar2021-12-071-1/+1
|
* blacked parsers & serializersnicholascar2021-12-071-2/+2
|
* Add type hintsIwan Aucamp2021-10-241-15/+31
| | | | | | | 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.
* Merge branch 'master' into hsolbrig/masterEdmond Chuc2021-07-081-3/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # rdflib/__init__.py # rdflib/compat.py # rdflib/namespace/__init__.py # rdflib/plugins/parsers/rdfxml.py # rdflib/plugins/serializers/rdfxml.py # rdflib/tools/csv2rdf.py # test/test_dawg.py # test/test_namespace.py # test/test_nt_misc.py # test/test_rdfxml.py # test/test_seq.py # test/test_trig.py # test/testutils.py
| * 2to3 whole sourcebaset0b32020-06-221-3/+1
| | | | | | | | Signed-off-by: t0b3 <thomas.bettler@gmail.com>
* | Fix more travis issues and problems.hsolbrig2020-05-261-0/+1
| | | | | | | | | | Note - the doctest in `rdflib/__init__.py` fails 50% of the time because there isn't a definite order in the turtle serialization Also, we still have a mystery issue of why `Namespace` isn't included in `from rdflib import *`
* | Refactor - module names don't match class nameshsolbrig2020-05-261-20/+20
|/ | | | | For some reason the sequence of processing is different in Travis than in PyCharm. Changing the module names eliminates any possibility of confusion. Also fixed a number of warnings, whines and general unhappiness in the build process.
* changes for flake8Nicholas Car2020-05-171-3/+3
|
* blacked all python filesNicholas Car2020-05-161-34/+39
|
* removal of all uses of package sixNicholas Car2020-05-161-5/+1
|
* Let argument of serialize method overwrite graph settingsNatanael Arndt2020-04-171-6/+14
|
* inverted precedence of base: graph wins over adding base to serialize(). ↵issue_1003Nicholas Car2020-04-161-3/+7
| | | | Added RDF/XML, TriX & 1/2 TriG (incomplete)
* namespace.py serializers/rdfxml.py stric qnamesTom Gillespie2020-03-121-3/+3
| | | | | | | | | The rdfxml serializer relied on namespace.py compute_qname to enforce qname correctness. Chagnging split characteristics to support n3 prefixes broke that assumption. This commit is a first pass at fixing the behvior. It may be worth renaming functions to make it clear that the current 'compute_qname' function is no longer actually computing a qname but a n3 prefix (or something like that).
* a slightly opinionated autopep8 runGunnar Aastrand Grimnes2018-10-301-2/+3
| | | | | | | | opinions is mainly: no to long lines, but not at any cost. notation3.py crashses autopep :D Also rdflib/__init__.py gets completely broken
* removed most of the six import from py3compatGunnar Aastrand Grimnes2017-01-301-1/+1
| | | | now six is used throughout.
* converted all base serialisers and parsersGunnar Aastrand Grimnes2017-01-301-3/+5
|
* Check if Literal.value is minidom.Document instead of parsing as XMLNiklas Lindström2014-02-231-14/+2
|
* Use rdf:parseType="Literal" notation for well-formed XMLLiterals in ↵Niklas Lindström2014-02-231-4/+22
| | | | PrettyXMLSerializer
* autopep8Gunnar Aastrand Grimnes2013-04-301-7/+7
|
* cleaning up some more old cruftgromgull2013-03-111-2/+0
|
* apply autopep8 standards.Graham Higgins2013-01-111-49/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | $ 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
* fixed various bugs with literal handlings in serializersgromgull2012-07-201-1/+3
|
* Remove print statement.Graham Higgins2012-04-021-2/+1
|
* TODO implemented: UserWarning emitted - fixes issue #160Graham Higgins2012-03-291-21/+73
|
* Uncomment __all__, tests do all passGraham Higgins2012-01-161-1/+1
|
* __all__ together nowGraham Higgins2012-01-141-0/+1
|
* Use sets to get unique values.Thomas Kluyver2011-11-121-3/+3
|
* Small Python 3 compatibility fixes, mainly around StringIOThomas Kluyver2011-11-121-1/+3
|
* Fix for issue #180Graham Higgins2011-10-261-1/+3
| | | | | | | Commented out the code that only includes BNode labels if they are referenced more than once because this can lead to incorrect graphs. It's entirely reasonable for pretty-xml rendering to be loquacious.
* Fix for issue 193. Contributed by Graham Klyne.Graham Higgins2011-09-241-0/+6
|
* Update issue 120eikeon2010-02-131-0/+271
Moving parsers and serializer implementations into rdflib.plugins package