From ce20fc4244d9b6d4c33051aba84db1b56a6c44c4 Mon Sep 17 00:00:00 2001 From: abram axel booth Date: Fri, 6 Dec 2024 13:46:17 -0500 Subject: [PATCH] remove unused code --- trove/render/_rendering.py | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/trove/render/_rendering.py b/trove/render/_rendering.py index bef8a9088..52e5f9e2c 100644 --- a/trove/render/_rendering.py +++ b/trove/render/_rendering.py @@ -2,8 +2,6 @@ import dataclasses from typing import Iterator -from primitive_metadata import primitive_rdf as rdf - from trove import exceptions as trove_exceptions @@ -47,23 +45,3 @@ def iter_content(self): raise trove_exceptions.CannotRenderStreamTwice self._started_already = True yield from self.content_stream - - -@dataclasses.dataclass -class LiteralRendering(ProtoRendering): - literal: rdf.Literal - # (TODO: languages) - - @property - def mediatype(self) -> str: - try: - return next( - rdf.iri_minus_namespace(_iri, namespace=rdf.IANA_MEDIATYPE) - for _iri in self.literal.datatype_iris - if _iri in rdf.IANA_MEDIATYPE - ) - except StopIteration: # no mediatype iri - return 'text/plain; charset=utf-8' - - def iter_content(self): - yield self.literal.unicode_value