Skip to content

Commit 9d18dcd

Browse files
authored
Merge pull request #46 from FoamyGuy/fix_null_label_issue
Fix null error from label property / resize
2 parents 3c36a11 + e3e4c24 commit 9d18dcd

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ repos:
1818
- id: end-of-file-fixer
1919
- id: trailing-whitespace
2020
- repo: https://github.com/pycqa/pylint
21-
rev: v2.17.4
21+
rev: v3.3.1
2222
hooks:
2323
- id: pylint
2424
name: pylint (library code)

.pylintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ valid-metaclass-classmethod-first-arg=mcs
361361
[DESIGN]
362362

363363
# Maximum number of arguments for function / method
364-
max-args=5
364+
max-args=18
365365

366366
# Maximum number of attributes for a class (see R0902).
367367
# max-attributes=7

adafruit_button/button_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def __init__(
7878
@property
7979
def label(self):
8080
"""The text label of the button"""
81-
return self._label.text
81+
return getattr(self._label, "text", None)
8282

8383
@label.setter
8484
def label(self, newtext):

0 commit comments

Comments
 (0)