kopia lustrzana https://github.com/micropython/micropython
all: Fix "reuse" and "overridden" spelling mistakes.
Codespell doesn't pick up "re-used" or "re-uses", and ignores the tests/ directory, so fix these manually. Signed-off-by: Damien George <damien@micropython.org>pull/13355/head
rodzic
7a794d0d8e
commit
ee226a8b43
|
@ -312,7 +312,7 @@ Broadcaster Role (Advertiser)
|
||||||
in all broadcasts, and *resp_data* is send in reply to an active scan.
|
in all broadcasts, and *resp_data* is send in reply to an active scan.
|
||||||
|
|
||||||
**Note:** if *adv_data* (or *resp_data*) is ``None``, then the data passed
|
**Note:** if *adv_data* (or *resp_data*) is ``None``, then the data passed
|
||||||
to the previous call to ``gap_advertise`` will be re-used. This allows a
|
to the previous call to ``gap_advertise`` will be reused. This allows a
|
||||||
broadcaster to resume advertising with just ``gap_advertise(interval_us)``.
|
broadcaster to resume advertising with just ``gap_advertise(interval_us)``.
|
||||||
To clear the advertising payload pass an empty ``bytes``, i.e. ``b''``.
|
To clear the advertising payload pass an empty ``bytes``, i.e. ``b''``.
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ Methods
|
||||||
|
|
||||||
The program is added to the instruction memory of this PIO instance. If the
|
The program is added to the instruction memory of this PIO instance. If the
|
||||||
instruction memory already contains this program, then its offset is
|
instruction memory already contains this program, then its offset is
|
||||||
re-used so as to save on instruction memory.
|
reused so as to save on instruction memory.
|
||||||
|
|
||||||
- *freq* is the frequency in Hz to run the state machine at. Defaults to
|
- *freq* is the frequency in Hz to run the state machine at. Defaults to
|
||||||
the system clock frequency.
|
the system clock frequency.
|
||||||
|
|
|
@ -211,7 +211,7 @@ two loops:
|
||||||
spi.readinto(buf)
|
spi.readinto(buf)
|
||||||
# process data in buf
|
# process data in buf
|
||||||
|
|
||||||
The first creates a buffer on each pass whereas the second re-uses a pre-allocated
|
The first creates a buffer on each pass whereas the second reuses a pre-allocated
|
||||||
buffer; this is both faster and more efficient in terms of memory fragmentation.
|
buffer; this is both faster and more efficient in terms of memory fragmentation.
|
||||||
|
|
||||||
**Bytes are smaller than ints**
|
**Bytes are smaller than ints**
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# test bytearray with its re-use of byte functions
|
# test bytearray with its reuse of byte functions
|
||||||
|
|
||||||
print(bytearray(b"hello world").find(b"ll"))
|
print(bytearray(b"hello world").find(b"ll"))
|
||||||
print(bytearray(b"hello\x00world").rfind(b"l"))
|
print(bytearray(b"hello\x00world").rfind(b"l"))
|
||||||
|
|
|
@ -57,7 +57,7 @@ def test(bdev, vfs_class):
|
||||||
break
|
break
|
||||||
vfs.mkdir(dname)
|
vfs.mkdir(dname)
|
||||||
|
|
||||||
# Also create a fully drained iterator and ensure trying to re-use it
|
# Also create a fully drained iterator and ensure trying to reuse it
|
||||||
# throws the correct exception.
|
# throws the correct exception.
|
||||||
idir_emptied = vfs.ilistdir("/")
|
idir_emptied = vfs.ilistdir("/")
|
||||||
l = list(idir_emptied)
|
l = list(idir_emptied)
|
||||||
|
|
|
@ -57,7 +57,7 @@ def test(bdev, vfs_class):
|
||||||
break
|
break
|
||||||
vfs.mkdir(dname)
|
vfs.mkdir(dname)
|
||||||
|
|
||||||
# Also create a fully drained iterator and ensure trying to re-use it
|
# Also create a fully drained iterator and ensure trying to reuse it
|
||||||
# throws the correct exception.
|
# throws the correct exception.
|
||||||
idir_emptied = vfs.ilistdir("/")
|
idir_emptied = vfs.ilistdir("/")
|
||||||
l = list(idir_emptied)
|
l = list(idir_emptied)
|
||||||
|
|
|
@ -37,7 +37,7 @@ def test(testdir):
|
||||||
break
|
break
|
||||||
vfs.mkdir(dname)
|
vfs.mkdir(dname)
|
||||||
|
|
||||||
# Also create a fully drained iterator and ensure trying to re-use it
|
# Also create a fully drained iterator and ensure trying to reuse it
|
||||||
# throws the correct exception.
|
# throws the correct exception.
|
||||||
idir_emptied = vfs.ilistdir("/")
|
idir_emptied = vfs.ilistdir("/")
|
||||||
l = list(idir_emptied)
|
l = list(idir_emptied)
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
# micropython is always builtin and cannot be overriden by the filesystem.
|
# micropython is always builtin and cannot be overridden by the filesystem.
|
||||||
print("ERROR: micropython from filesystem")
|
print("ERROR: micropython from filesystem")
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
# sys is always builtin and cannot be overriden by the filesystem.
|
# sys is always builtin and cannot be overridden by the filesystem.
|
||||||
print("ERROR: sys from filesystem")
|
print("ERROR: sys from filesystem")
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
# usys (and any u-prefix) is always builtin and cannot be overriden by the
|
# usys (and any u-prefix) is always builtin and cannot be overridden by the
|
||||||
# filesystem.
|
# filesystem.
|
||||||
print("ERROR: usys from filesystem")
|
print("ERROR: usys from filesystem")
|
||||||
|
|
Ładowanie…
Reference in New Issue