Skip to content

Commit 3cee61c

Browse files
committed
chore: Fix spelling and typos in comments and docstring.
Spelling preferences based on codespell configuration. Signed-off-by: Jos Verlinde <Jos.Verlinde@Microsoft.com>
1 parent 0a6219e commit 3cee61c

File tree

15 files changed

+26
-23
lines changed

15 files changed

+26
-23
lines changed

micropython/bluetooth/aioble/aioble/central.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ async def _connect(
119119
_connecting.add(device)
120120

121121
# Event will be set in the connected IRQ, and then later
122-
# re-used to notify disconnection.
122+
# reused to notify disconnection.
123123
connection._event = connection._event or asyncio.ThreadSafeFlag()
124124

125125
try:

micropython/bluetooth/aioble/aioble/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ async def read(self, timeout_ms=1000):
244244
self._register_with_connection()
245245
# This will be set by the done IRQ.
246246
self._read_status = None
247-
# This will be set by the result and done IRQs. Re-use if possible.
247+
# This will be set by the result and done IRQs. Reuse if possible.
248248
self._read_event = self._read_event or asyncio.ThreadSafeFlag()
249249

250250
# Issue the read.

micropython/espflash/example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
esp = espflash.ESPFlash(reset, gpio0, uart)
1414
# Enter bootloader download mode, at 115200
1515
esp.bootloader()
16-
# Can now chage to higher/lower baudrate
16+
# Can now change to higher/lower baudrate
1717
esp.set_baudrate(921600)
1818
# Must call this first before any flash functions.
1919
esp.flash_attach()

micropython/lora/tests/test_time_on_air.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66
# ## What is this?
77
#
8-
# Host tests for the BaseModem.get_time_on_air_us() function. Theses against
8+
# Host tests for the BaseModem.get_time_on_air_us() function. These test against
99
# dummy test values produced by the Semtech "SX1261 LoRa Calculator" software,
1010
# as downloaded from
1111
# https://lora-developers.semtech.com/documentation/product-documents/

micropython/senml/examples/custom_record.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class Coordinates(SenmlRecord):
3232
def __init__(self, name, **kwargs):
3333
"""overriding the init function so we can initiate the 3 senml records that will represent lat,lon, alt"""
3434
self._lat = SenmlRecord(
35-
"lattitude", unit=SenmlUnits.SENML_UNIT_DEGREES_LATITUDE
35+
"latitude", unit=SenmlUnits.SENML_UNIT_DEGREES_LATITUDE
3636
) # create these before calling base constructor so that all can be init correctly from constructor
3737
self._lon = SenmlRecord("longitude", unit=SenmlUnits.SENML_UNIT_DEGREES_LONGITUDE)
3838
self._alt = SenmlRecord("altitude", unit=SenmlUnits.SENML_UNIT_METER)

micropython/senml/senml/senml_record.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def _build_rec_dict(self, naming_map, appendTo):
188188
elif isinstance(self._value, bytearray):
189189
if (
190190
naming_map["vd"] == "vd"
191-
): # neeed to make a distinction between json (needs base64) and cbor (needs binary)
191+
): # need to make a distinction between json (needs base64) and cbor (needs binary)
192192
result[naming_map["vd"]] = binascii.b2a_base64(self._value, newline=False).decode(
193193
"utf8"
194194
)
@@ -216,7 +216,7 @@ def _build_rec_dict(self, naming_map, appendTo):
216216

217217
def _from_raw(self, raw, naming_map):
218218
"""
219-
extracts te data from the raw record. Used during parsing of incoming data.
219+
extracts the data from the raw record. Used during parsing of incoming data.
220220
:param raw: a raw senml record which still contains the original field names
221221
:param naming_map: used to map cbor names to json field names
222222
:return:

micropython/usb/usb-device/usb/device/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ def stall(self, ep_addr, *args):
611611
# argument to set or clear.
612612
#
613613
# Generally endpoint STALL is handled automatically, but there are some
614-
# device classes that need to explicitly stall or unstall an endpoint
614+
# device classes that need to explicitly stall or uninstall an endpoint
615615
# under certain conditions.
616616
if not self._open or ep_addr not in self._eps:
617617
raise RuntimeError

python-ecosys/requests/requests/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ def request(
5656
import binascii
5757

5858
username, password = auth
59-
formated = b"{}:{}".format(username, password)
60-
formated = str(binascii.b2a_base64(formated)[:-1], "ascii")
61-
headers["Authorization"] = "Basic {}".format(formated)
59+
formatted = b"{}:{}".format(username, password)
60+
formatted = str(binascii.b2a_base64(formatted)[:-1], "ascii")
61+
headers["Authorization"] = "Basic {}".format(formatted)
6262

6363
try:
6464
proto, dummy, host, path = url.split("/", 3)

python-stdlib/fnmatch/test_fnmatch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ def test_fnmatchcase(self):
5858

5959
@unittest.skip("unsupported on MicroPython")
6060
def test_bytes(self):
61-
self.check_match(b"test", b"te*")
62-
self.check_match(b"test\xff", b"te*\xff")
61+
self.check_match(b"test", b"te*") # codespell:ignore
62+
self.check_match(b"test\xff", b"te*\xff") # codespell:ignore
6363
self.check_match(b"foo\nbar", b"foo*")
6464

6565

python-stdlib/unittest/tests/test_assertions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def testFalse(self):
9292
with self.assertRaises(AssertionError):
9393
self.assertFalse(True)
9494

95-
def testIn(self):
95+
def testIn(self): # codespell:ignore
9696
self.assertIn("t", "cat")
9797
with self.assertRaises(AssertionError):
9898
self.assertIn("x", "cat")

0 commit comments

Comments
 (0)