Skip to content

Commit f115dd5

Browse files
committed
Merge remote-tracking branch 'Adafruit/master' into api_example
# Conflicts: # docs/examples.rst
2 parents ff3ac13 + 1da9501 commit f115dd5

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

.pylintrc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ ignore-patterns=
2222
#init-hook=
2323

2424
# Use multiple processes to speed up Pylint.
25-
# jobs=1
26-
jobs=2
25+
jobs=1
2726

2827
# List of plugins (as comma separated values of python modules names) to load,
2928
# usually to register additional checkers.
@@ -253,7 +252,7 @@ ignore-docstrings=yes
253252
ignore-imports=yes
254253

255254
# Minimum lines number of a similarity.
256-
min-similarity-lines=4
255+
min-similarity-lines=12
257256

258257

259258
[BASIC]

adafruit_display_text/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,6 @@ def __init__(
235235

236236
self._text = text
237237

238-
if label_direction not in ["LTR", "RTL", "UPR", "DWR", "TTB"]:
239-
raise RuntimeError("Please provide a valid text direction")
240238
self._label_direction = label_direction
241239

242240
self.baseline = -1.0

adafruit_display_text/bitmap_label.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ def __init__(self, font, **kwargs) -> None:
108108
self.background_color = kwargs.get("background_color", None)
109109
self._label_direction = kwargs.get("label_direction", "LTR")
110110

111+
if self._label_direction not in ["LTR", "RTL", "UPD", "UPR", "DWR"]:
112+
raise RuntimeError("Please provide a valid text direction")
113+
111114
if self._label_direction == "RTL":
112115
self._text = "".join(reversed(self._text))
113116

adafruit_display_text/label.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@ def __init__(self, font, **kwargs) -> None:
127127
self.base_alignment = kwargs.get("base_alignment", False)
128128
self._label_direction = kwargs.get("label_direction", "LTR")
129129

130+
if self._label_direction not in ["LTR", "RTL", "UPR", "DWR", "TTB"]:
131+
raise RuntimeError("Please provide a valid text direction")
132+
130133
if text is not None:
131134
self._update_text(str(text))
132135
if (kwargs.get("anchored_position", None) is not None) and (

0 commit comments

Comments
 (0)