Skip to content

Commit 3ee63d2

Browse files
authored
Merge pull request #206 from dhalbert/pnp_id-defaults
Use default values when pnp_id is not supplied
2 parents 313e7cd + e1df45f commit 3ee63d2

File tree

3 files changed

+7
-2
lines changed

3 files changed

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

.pylintrc

Lines changed: 2 additions & 1 deletion
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

Lines changed: 4 additions & 0 deletions
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)