Skip to content

Commit

Permalink
Merge branch 'release/v0.20.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
ja573 committed Sep 26, 2023
2 parents 73a4a5e + 04cace1 commit 479cb74
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Install is either via pip or cloning the repository.

From pip:
```sh
python3 -m pip install thothlibrary==0.20.1
python3 -m pip install thothlibrary==0.20.2
```

Or from the repo:
Expand Down
2 changes: 1 addition & 1 deletion thothlibrary/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
"""GraphQL client for Thoth"""

__version__ = "0.20.1"
__version__ = "0.20.2"
__author__ = "Javier Arias <javi@openbookpublishers.com>"
__copyright__ = "Copyright (c) 2020 Open Book Publishers"
__license__ = "Apache 2.0"
Expand Down
4 changes: 2 additions & 2 deletions thothlibrary/mutation.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
it under the terms of the Apache License v2.0.
"""


import re
import json
import urllib
from .errors import ThothError
Expand Down Expand Up @@ -344,7 +344,7 @@ def generate_values(self):
"""Returns a set of mutation statements based on object attributes."""
def sanitise(text):
"""Escape quotes and linebreaks"""
tmp = text.replace("\n", "\\n")
tmp = re.sub(r'(\r\n?|\n)', r'\\n', text)
return tmp.replace('"', '''\\"''')
values = []
for key, enclose in self.MUTATIONS[self.mutation_name]["fields"]:
Expand Down

0 comments on commit 479cb74

Please sign in to comment.