Skip to content

Commit 2721450

Browse files
tools: fix typos, grammar, punctuation
1 parent 88294f9 commit 2721450

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

tools/decode_s2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@
112112

113113
def twos_comp(val, bits):
114114
"""
115-
compute the correct value of a 2's complement
116-
based on the number of bits in the source
115+
Compute the correct two's complement value
116+
based on the number of bits in the source.
117117
"""
118118
if (val & (1 << (bits - 1))) != 0: # if sign bit is set e.g., 8bit: 128-255
119119
val = val - (1 << bits) # compute negative value

tools/disassemble.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
import sys
1111

1212

13-
# placeholders:
14-
# these functions will be dynamically loaded later based on the chosen cpu
13+
# Placeholders:
14+
# These functions will be dynamically loaded later based on the chosen CPU
1515
decode_instruction, get_instruction_fields = None, None
1616

1717

@@ -21,7 +21,7 @@ def load_decoder(cpu):
2121
elif cpu == 'esp32s2':
2222
mod = 'decode_s2'
2323
else:
24-
raise ValueError('Invalid cpu')
24+
raise ValueError('Invalid CPU')
2525

2626
relative_import = 1 if '/' in __file__ else 0
2727
decode = __import__(mod, globals(), locals(), [], relative_import)

tools/genpkgjson.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
"""
99
Tool for generating package.json for the MIP package manager
1010
11-
Run this tool from the repo root, like:
11+
Run this tool from the repo root like this:
1212
1313
python tools/genpkgjson.py > package.json
1414
1515
Note:
16-
This tool works with both python3 and micropyton.
16+
This tool works with both Python 3 and MicroPython.
1717
"""
1818

1919
import os
@@ -38,9 +38,9 @@ def print_package_json(urls):
3838
"""
3939
Custom-formatting JSON output for better readability
4040
41-
json.dumps in MicroPython cannot format the output and python3
42-
puts each element of each urls' sub-arrays onto a new line.
43-
Here we print each file and its source url onto the same line.
41+
json.dumps in MicroPython cannot format the output, and Python 3
42+
puts each element of each URLs subarray on a new line.
43+
Here we print each file and its source URL on the same line.
4444
"""
4545
print('{')
4646
print(f' "v":{PACKAGE_JSON_VERSION},')

0 commit comments

Comments
 (0)