File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
adafruit_ble/services/standard Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 1414import binascii
1515import os
1616import sys
17- from collections .abc import Iterable
1817
1918from .. import Service
2019from ...uuid import StandardUUID
2120from ...characteristics import StructCharacteristic
2221from ...characteristics .string import FixedStringCharacteristic
2322
2423try :
25- from typing import Optional , TYPE_CHECKING
24+ from typing import Iterable , Optional , TYPE_CHECKING
2625
2726 if TYPE_CHECKING :
2827 import _bleio
@@ -72,6 +71,10 @@ def __init__( # pylint: disable=too-many-arguments
7271 pass
7372 if firmware_revision is None :
7473 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 )
7578 super ().__init__ (
7679 manufacturer = manufacturer ,
7780 software_revision = software_revision ,
You can’t perform that action at this time.
0 commit comments