]> Repositories - Adafruit_Blinka-hackapet.git/commitdiff
Stub out more of _bleio needed by pylint.
authorScott Shawcroft <scott@tannewt.org>
Tue, 21 Jan 2020 22:35:46 +0000 (14:35 -0800)
committerScott Shawcroft <scott@tannewt.org>
Tue, 21 Jan 2020 22:36:00 +0000 (14:36 -0800)
src/_bleio.py

index 6423c274498b5ff98d6ef2fa848a47c7fd8b06bc..03f7e45ffb507909a492e50aba05c3ca516ce500 100755 (executable)
@@ -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."""
 
 """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
 class Attribute:
     NO_ACCESS = 0
     OPEN = 0
@@ -14,6 +16,16 @@ class UUID:
     def __init__(self, uuid):
         pass
 
     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
 class Characteristic:
     BROADCAST = 0
     READ = 0
@@ -21,3 +33,11 @@ class Characteristic:
     NOTIFY = 0
     INDICATE = 0
     WRITE_NO_RESPONSE = 0
     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()
+
+