Skip to content

Commit e1df45f

Browse files
committed
Use default values when pnp_id is not supplied; max-args increased in .pylintrc
1 parent 313e7cd commit e1df45f

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.pre-commit-config.yaml

+1-1
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.0
2222
hooks:
2323
- id: pylint
2424
name: pylint (library code)

.pylintrc

+2-1
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,8 @@ valid-metaclass-classmethod-first-arg=mcs
361361
[DESIGN]
362362

363363
# Maximum number of arguments for function / method
364-
max-args=5
364+
# Changed for this library, Adafruit_CircuitPython_BLE
365+
max-args=9
365366

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

adafruit_ble/services/standard/device_info.py

+4
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ def __init__(
7171
pass
7272
if firmware_revision is None:
7373
firmware_revision = getattr(os.uname(), "version", None)
74+
if pnp_id is None:
75+
# These values are not necessarily valid according to the spec,
76+
# but they work on Android and iOS.
77+
pnp_id = (0x00, 0x0000, 0x0000, 0x0000)
7478
super().__init__(
7579
manufacturer=manufacturer,
7680
software_revision=software_revision,

0 commit comments

Comments
 (0)