Skip to content

Commit

Permalink
Combine reverse read methods
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaneSutro committed Jul 30, 2022
1 parent 326e497 commit 8b4d684
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 3 additions & 3 deletions vestaboard/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,11 @@ def read(self, options: dict = {}):
print(res.json())
if 'convert' in options and options['convert']:
if 'normalize' in options and options['normalize']:
converted = Formatter()._normalize_reversed_text(res.json()['message'])
print(converted)
converted = Formatter()._reverse_convert(res.json()['message'], normalize=True)
return converted
else:
converted = Formatter()._reverse_convert(res.json()['message'])
print(converted)
return converted
return res.json()

def _post_local(self, text):
Expand Down
3 changes: 0 additions & 3 deletions vestaboard/formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,3 @@ def _reverse_convert(charArray, normalize: bool = False):
else:
return convertedArray

def _normalize_reversed_text(self, charArray):
return self._reverse_convert(charArray, normalize=True)

0 comments on commit 8b4d684

Please sign in to comment.