Skip to content

Commit

Permalink
Merge pull request #46 from FoamyGuy/fix_null_label_issue
Browse files Browse the repository at this point in the history
Fix null error from label property / resize
  • Loading branch information
FoamyGuy authored Nov 13, 2024
2 parents 3c36a11 + e3e4c24 commit 9d18dcd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/pycqa/pylint
rev: v2.17.4
rev: v3.3.1
hooks:
- id: pylint
name: pylint (library code)
Expand Down
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ valid-metaclass-classmethod-first-arg=mcs
[DESIGN]

# Maximum number of arguments for function / method
max-args=5
max-args=18

# Maximum number of attributes for a class (see R0902).
# max-attributes=7
Expand Down
2 changes: 1 addition & 1 deletion adafruit_button/button_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def __init__(
@property
def label(self):
"""The text label of the button"""
return self._label.text
return getattr(self._label, "text", None)

@label.setter
def label(self, newtext):
Expand Down

0 comments on commit 9d18dcd

Please sign in to comment.