From 3315db0995c6ba1d72bef1cfee4fc4eb5a04dd81 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 21 Jan 2020 14:35:46 -0800 Subject: [PATCH] Stub out more of _bleio needed by pylint. --- src/_bleio.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) 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() + + -- 2.49.0