Skip to content

Commit 674c845

Browse files
authored
Merge pull request #5760 from jepler/rename_under_typing
circuitpython_stubs: Use `circuitpython_typing` for cp-specific typing
2 parents bea0526 + 828b7d8 commit 674c845

File tree

37 files changed

+59
-67
lines changed

37 files changed

+59
-67
lines changed

.readthedocs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ version: 2
1111
build:
1212
os: ubuntu-20.04
1313
tools:
14-
python: "3.9"
14+
python: "3"
1515

1616
submodules:
1717
include:
@@ -22,4 +22,4 @@ formats:
2222

2323
python:
2424
install:
25-
- requirements: docs/requirements.txt
25+
- requirements: requirements-doc.txt

docs/requirements.txt

Lines changed: 0 additions & 8 deletions
This file was deleted.

ports/raspberrypi/bindings/rp2pio/StateMachine.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(rp2pio_statemachine_stop_obj, rp2pio_statemachine_stop
354354
//| def write(self, buffer: ReadableBuffer, *, start: int = 0, end: Optional[int] = None) -> None:
355355
//| """Write the data contained in ``buffer`` to the state machine. If the buffer is empty, nothing happens.
356356
//|
357-
//| :param ~_typing.ReadableBuffer buffer: Write out the data in this buffer
357+
//| :param ~circuitpython_typing.ReadableBuffer buffer: Write out the data in this buffer
358358
//| :param int start: Start of the slice of ``buffer`` to write out: ``buffer[start:end]``
359359
//| :param int end: End of the slice; this index is not included. Defaults to ``len(buffer)``"""
360360
//| ...
@@ -402,7 +402,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(rp2pio_statemachine_write_obj, 2, rp2pio_statemachine
402402
//| """Read into ``buffer``. If the number of bytes to read is 0, nothing happens. The buffer
403403
//| include any data added to the fifo even if it was added before this was called.
404404
//|
405-
//| :param ~_typing.WriteableBuffer buffer: Read data into this buffer
405+
//| :param ~circuitpython_typing.WriteableBuffer buffer: Read data into this buffer
406406
//| :param int start: Start of the slice of ``buffer`` to read into: ``buffer[start:end]``
407407
//| :param int end: End of the slice; this index is not included. Defaults to ``len(buffer)``"""
408408
//| ...
@@ -450,8 +450,8 @@ MP_DEFINE_CONST_FUN_OBJ_KW(rp2pio_statemachine_readinto_obj, 2, rp2pio_statemach
450450
//| may be different. The function will return once both are filled.
451451
//| If buffer slice lengths are both 0, nothing happens.
452452
//|
453-
//| :param ~_typing.ReadableBuffer buffer_out: Write out the data in this buffer
454-
//| :param ~_typing.WriteableBuffer buffer_in: Read data into this buffer
453+
//| :param ~circuitpython_typing.ReadableBuffer buffer_out: Write out the data in this buffer
454+
//| :param ~circuitpython_typing.WriteableBuffer buffer_in: Read data into this buffer
455455
//| :param int out_start: Start of the slice of buffer_out to write out: ``buffer_out[out_start:out_end]``
456456
//| :param int out_end: End of the slice; this index is not included. Defaults to ``len(buffer_out)``
457457
//| :param int in_start: Start of the slice of ``buffer_in`` to read into: ``buffer_in[in_start:in_end]``

requirements-doc.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ astroid
88
setuptools
99

1010
# For sphinx
11-
Sphinx<4
11+
sphinx>=4.0.0
1212
sphinx-autoapi
1313
sphinx-rtd-theme
1414
sphinxcontrib-svg2pdfconverter

shared-bindings/_bleio/Adapter.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,8 @@ const mp_obj_property_t bleio_adapter_name_obj = {
196196
//| .. note:: If you set ``anonymous=True``, then a timeout must be specified. If no timeout is
197197
//| specified, then the maximum allowed timeout will be selected automatically.
198198
//|
199-
//| :param ~_typing.ReadableBuffer data: advertising data packet bytes
200-
//| :param ~_typing.ReadableBuffer scan_response: scan response data packet bytes. ``None`` if no scan response is needed.
199+
//| :param ~circuitpython_typing.ReadableBuffer data: advertising data packet bytes
200+
//| :param ~circuitpython_typing.ReadableBuffer scan_response: scan response data packet bytes. ``None`` if no scan response is needed.
201201
//| :param bool connectable: If `True` then other devices are allowed to connect to this peripheral.
202202
//| :param bool anonymous: If `True` then this device's MAC address is randomized before advertising.
203203
//| :param int timeout: If set, we will only advertise for this many seconds. Zero means no timeout.
@@ -282,7 +282,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_adapter_stop_advertising_obj, bleio_adapt
282282
//| """Starts a BLE scan and returns an iterator of results. Advertisements and scan responses are
283283
//| filtered and returned separately.
284284
//|
285-
//| :param ~_typing.ReadableBuffer prefixes: Sequence of byte string prefixes to filter advertising packets
285+
//| :param ~circuitpython_typing.ReadableBuffer prefixes: Sequence of byte string prefixes to filter advertising packets
286286
//| with. A packet without an advertising structure that matches one of the prefixes is
287287
//| ignored. Format is one byte for length (n) and n bytes of prefix and can be repeated.
288288
//| :param int buffer_size: the maximum number of advertising bytes to buffer.

shared-bindings/_bleio/Address.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
//| """Create a new Address object encapsulating the address value.
4343
//| The value itself can be one of:
4444
//|
45-
//| :param ~_typing.ReadableBuffer address: The address value to encapsulate. A buffer object (bytearray, bytes) of 6 bytes.
45+
//| :param ~circuitpython_typing.ReadableBuffer address: The address value to encapsulate. A buffer object (bytearray, bytes) of 6 bytes.
4646
//| :param int address_type: one of the integer values: `PUBLIC`, `RANDOM_STATIC`,
4747
//| `RANDOM_PRIVATE_RESOLVABLE`, or `RANDOM_PRIVATE_NON_RESOLVABLE`."""
4848
//| ...

shared-bindings/_bleio/Characteristic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
//| is 512, or possibly 510 if ``fixed_length`` is False. The default, 20, is the maximum
6868
//| number of data bytes that fit in a single BLE 4.x ATT packet.
6969
//| :param bool fixed_length: True if the characteristic value is of fixed length.
70-
//| :param ~_typing.ReadableBuffer initial_value: The initial value for this characteristic. If not given, will be
70+
//| :param ~circuitpython_typing.ReadableBuffer initial_value: The initial value for this characteristic. If not given, will be
7171
//| filled with zeros.
7272
//| :param str user_description: User friendly description of the characteristic
7373
//|

shared-bindings/_bleio/Descriptor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
//| is 512, or possibly 510 if ``fixed_length`` is False. The default, 20, is the maximum
6262
//| number of data bytes that fit in a single BLE 4.x ATT packet.
6363
//| :param bool fixed_length: True if the descriptor value is of fixed length.
64-
//| :param ~_typing.ReadableBuffer initial_value: The initial value for this descriptor.
64+
//| :param ~circuitpython_typing.ReadableBuffer initial_value: The initial value for this descriptor.
6565
//|
6666
//| :return: the new Descriptor."""
6767
//| ...

shared-bindings/_bleio/UUID.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
//| temporary 16-bit UUID that can be used in place of the full 128-bit UUID.
4949
//|
5050
//| :param value: The uuid value to encapsulate
51-
//| :type value: int, ~_typing.ReadableBuffer or str"""
51+
//| :type value: int, ~circuitpython_typing.ReadableBuffer or str"""
5252
//| ...
5353
//|
5454
STATIC mp_obj_t bleio_uuid_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {

shared-bindings/_eve/__init__.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(flush_obj, _flush);
7979
//| def cc(self, b: ReadableBuffer) -> None:
8080
//| """Append bytes to the command FIFO.
8181
//|
82-
//| :param ~_typing.ReadableBuffer b: The bytes to add"""
82+
//| :param ~circuitpython_typing.ReadableBuffer b: The bytes to add"""
8383
//| ...
8484
//|
8585
STATIC mp_obj_t _cc(mp_obj_t self, mp_obj_t b) {

0 commit comments

Comments
 (0)