Skip to content

Commit

Permalink
fix for sonarcloud-reported bug (#1945)
Browse files Browse the repository at this point in the history
invalid "+" operation between incompatible types (str and type) - [sonarcloud-reported bug](https://sonarcloud.io/project/issues?issues=AYDHhHV9L8VDMGmTmRtc&open=AYDHhHV9L8VDMGmTmRtc&id=RDFLib_rdflib)

Changed exception string construction to use `f""` format
  • Loading branch information
Graham Higgins committed May 25, 2022
1 parent eff3b31 commit 32979d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rdflib/plugins/serializers/trix.py
Expand Up @@ -47,7 +47,7 @@ def serialize(
elif isinstance(self.store, Graph):
self._writeGraph(self.store)
else:
raise Exception("Unknown graph type: " + type(self.store))
raise Exception(f"Unknown graph type: {type(self.store)}")

self.writer.pop()
stream.write("\n".encode("latin-1"))
Expand Down

0 comments on commit 32979d1

Please sign in to comment.