From: Scott Shawcroft Date: Tue, 21 Jan 2020 22:35:46 +0000 (-0800) Subject: Stub out more of _bleio needed by pylint. X-Git-Tag: 3.5.1^2 X-Git-Url: https://git.ayoreis.com/Adafruit_Blinka-hackapet.git/commitdiff_plain/3315db0995c6ba1d72bef1cfee4fc4eb5a04dd81 Stub out more of _bleio needed by pylint. --- diff --git a/src/_bleio.py b/src/_bleio.py index 6423c27..03f7e45 100755 --- a/src/_bleio.py +++ b/src/_bleio.py @@ -1,6 +1,8 @@ """This is a stub of _bleio for use in GitHub Actions CI. It is NOT meant to provide _bleio functionality in CPython.""" +adapter = None + class Attribute: NO_ACCESS = 0 OPEN = 0 @@ -14,6 +16,16 @@ class UUID: def __init__(self, uuid): pass +class Descriptor: + @staticmethod + def add_to_characteristic(characteristic, uuid, *, read_perm=Attribute.OPEN, + write_perm=Attribute.OPEN, max_length=20, fixed_length=False, + initial_value=b''): + pass + +class CharacteristicBuffer: + pass + class Characteristic: BROADCAST = 0 READ = 0 @@ -21,3 +33,11 @@ class Characteristic: NOTIFY = 0 INDICATE = 0 WRITE_NO_RESPONSE = 0 + + @staticmethod + def add_to_service(service, uuid, *, properties=0, read_perm=Attribute.OPEN, + write_perm=Attribute.OPEN, max_length=20, fixed_length=False, + initial_value=None): + raise NotImplementedError() + +