Skip to content

Commit d0d949c

Browse files
committed
Made every init return None
1 parent d358c91 commit d0d949c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+86
-86
lines changed

shared-bindings/_bleio/Adapter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
//| connections and also initiate connections."""
6666
//|
6767

68-
//| def __init__(self):
68+
//| def __init__(self) -> None:
6969
//| """You cannot create an instance of `_bleio.Adapter`.
7070
//| Use `_bleio.adapter` to access the sole instance available."""
7171
//| ...

shared-bindings/_bleio/Address.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
//| """Encapsulates the address of a BLE device."""
3939
//|
4040

41-
//| def __init__(self, address: ReadableBuffer, address_type: int):
41+
//| def __init__(self, address: ReadableBuffer, address_type: int) -> None:
4242
//| """Create a new Address object encapsulating the address value.
4343
//| The value itself can be one of:
4444
//|

shared-bindings/_bleio/Attribute.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
//| :py:class:`~Characteristic` and :py:class:`~Descriptor`,
3737
//| but is not defined as a Python superclass of those classes."""
3838
//|
39-
//| def __init__(self):
39+
//| def __init__(self) -> None:
4040
//| """You cannot create an instance of :py:class:`~_bleio.Attribute`."""
4141
//| ...
4242
//|

shared-bindings/_bleio/Characteristic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
//| """Stores information about a BLE service characteristic and allows reading
3838
//| and writing of the characteristic's value."""
3939
//|
40-
//| def __init__(self):
40+
//| def __init__(self) -> None:
4141
//| """There is no regular constructor for a Characteristic. A new local Characteristic can be created
4242
//| and attached to a Service by calling `add_to_service()`.
4343
//| Remote Characteristic objects are created by `Connection.discover_remote_services()`

shared-bindings/_bleio/CharacteristicBuffer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ STATIC void raise_error_if_not_connected(bleio_characteristic_buffer_obj_t *self
4444
//| class CharacteristicBuffer:
4545
//| """Accumulates a Characteristic's incoming values in a FIFO buffer."""
4646
//|
47-
//| def __init__(self, characteristic: Characteristic, *, timeout: int = 1, buffer_size: int = 64):
47+
//| def __init__(self, characteristic: Characteristic, *, timeout: int = 1, buffer_size: int = 64) -> None:
4848
//|
4949
//| """Monitor the given Characteristic. Each time a new value is written to the Characteristic
5050
//| add the newly-written bytes to a FIFO buffer.

shared-bindings/_bleio/Connection.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ void bleio_connection_ensure_connected(bleio_connection_obj_t *self) {
6868
}
6969
}
7070

71-
//| def __init__(self):
71+
//| def __init__(self) -> None:
7272
//| """Connections cannot be made directly. Instead, to initiate a connection use `Adapter.connect`.
7373
//| Connections may also be made when another device initiates a connection. To use a Connection
7474
//| created by a peer, read the `Adapter.connections` property.

shared-bindings/_bleio/Descriptor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
//| Descriptors are attached to BLE characteristics and provide contextual
4040
//| information about the characteristic."""
4141
//|
42-
//| def __init__(self):
42+
//| def __init__(self) -> None:
4343
//| """There is no regular constructor for a Descriptor. A new local Descriptor can be created
4444
//| and attached to a Characteristic by calling `add_to_characteristic()`.
4545
//| Remote Descriptor objects are created by `Connection.discover_remote_services()`

shared-bindings/_bleio/PacketBuffer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
//| When we're the server, we ignore all connections besides the first to subscribe to
4545
//| notifications."""
4646
//|
47-
//| def __init__(self, characteristic: Characteristic, *, buffer_size: int):
47+
//| def __init__(self, characteristic: Characteristic, *, buffer_size: int) -> None:
4848
//| """Monitor the given Characteristic. Each time a new value is written to the Characteristic
4949
//| add the newly-written bytes to a FIFO buffer.
5050
//|

shared-bindings/_bleio/ScanEntry.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
//| it has no user-visible constructor."""
4242
//|
4343

44-
//| def __init__(self):
44+
//| def __init__(self) -> None:
4545
//| """Cannot be instantiated directly. Use `_bleio.Adapter.start_scan`."""
4646
//| ...
4747
//|

shared-bindings/_bleio/ScanResults.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ STATIC mp_obj_t scanresults_iternext(mp_obj_t self_in) {
4646
return MP_OBJ_STOP_ITERATION;
4747
}
4848

49-
//| def __init__(self):
49+
//| def __init__(self) -> None:
5050
//| """Cannot be instantiated directly. Use `_bleio.Adapter.start_scan`."""
5151
//| ...
5252
//|

0 commit comments

Comments
 (0)