Skip to content

Commit

Permalink
Merge pull request #206 from dhalbert/pnp_id-defaults
Browse files Browse the repository at this point in the history
Use default values when pnp_id is not supplied
  • Loading branch information
dhalbert authored Oct 20, 2024
2 parents 313e7cd + e1df45f commit 3ee63d2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 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.0
hooks:
- id: pylint
name: pylint (library code)
Expand Down
3 changes: 2 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,8 @@ valid-metaclass-classmethod-first-arg=mcs
[DESIGN]

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

# Maximum number of attributes for a class (see R0902).
# max-attributes=7
Expand Down
4 changes: 4 additions & 0 deletions adafruit_ble/services/standard/device_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ def __init__(
pass
if firmware_revision is None:
firmware_revision = getattr(os.uname(), "version", None)
if pnp_id is None:
# These values are not necessarily valid according to the spec,
# but they work on Android and iOS.
pnp_id = (0x00, 0x0000, 0x0000, 0x0000)
super().__init__(
manufacturer=manufacturer,
software_revision=software_revision,
Expand Down

0 comments on commit 3ee63d2

Please sign in to comment.