Skip to content

Commit 7218d6b

Browse files
committed
Reformat pass 1
1 parent de63e10 commit 7218d6b

File tree

953 files changed

+56226
-57419
lines changed

Some content is hidden

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

953 files changed

+56226
-57419
lines changed

.github/ISSUE_TEMPLATE/Issue-report.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ body:
55
- type: markdown
66
attributes:
77
value: |
8-
* Before reporting a new issue please check and search in [List of existing issues](https://github.com/espressif/arduino-esp32/issues?q=is%3Aissue)
8+
* Before reporting a new issue please check and search in [List of existing issues](https://github.com/espressif/arduino-esp32/issues?q=is%3Aissue)
99
* Please check [Online Documentation](https://docs.espressif.com/projects/arduino-esp32/en/latest/index.html)
1010
* Take a look on [Troubleshooting guide](https://docs.espressif.com/projects/arduino-esp32/en/latest/troubleshooting.html)
1111
* If still experiencing the issue, please provide as many details as possible below about your hardware, computer setup and code.
@@ -24,7 +24,7 @@ body:
2424
description: What development board or other hardware is the chip attached to?
2525
placeholder: ex. DevKitC, plain module on breadboard, etc. If your hardware is custom or unusual, please attach a photo.
2626
validations:
27-
required: true
27+
required: true
2828
- type: textarea
2929
id: other-hw
3030
attributes:
@@ -50,7 +50,7 @@ body:
5050
- v2.0.8
5151
- v2.0.7
5252
- v2.0.6
53-
- v2.0.5
53+
- v2.0.5
5454
- v2.0.4
5555
- v2.0.3
5656
- v2.0.2
@@ -63,11 +63,11 @@ body:
6363
- type: input
6464
id: IDE
6565
attributes:
66-
label: IDE Name
67-
description: What IDE are you using?
68-
placeholder: eg. Arduino IDE, PlatformIO, Sloeber...
66+
label: IDE Name
67+
description: What IDE are you using?
68+
placeholder: eg. Arduino IDE, PlatformIO, Sloeber...
6969
validations:
70-
required: true
70+
required: true
7171
- type: input
7272
id: os
7373
attributes:
@@ -85,13 +85,13 @@ body:
8585
validations:
8686
required: true
8787
- type: dropdown
88-
id: PSRAM
88+
id: PSRAM
8989
attributes:
9090
label: PSRAM enabled
9191
description: Is PSRAM enabled?
9292
options:
93-
- 'yes'
94-
- 'no'
93+
- "yes"
94+
- "no"
9595
validations:
9696
required: true
9797
- type: input
@@ -118,7 +118,7 @@ body:
118118
placeholder: ex. Related part of the code to replicate the issue
119119
render: cpp
120120
validations:
121-
required: true
121+
required: true
122122
- type: textarea
123123
id: Debug
124124
attributes:
@@ -127,11 +127,11 @@ body:
127127
placeholder: Enable Core debug level - Debug on tools menu of Arduino IDE, then put the serial output here.
128128
render: plain
129129
validations:
130-
required: true
130+
required: true
131131
- type: textarea
132132
id: other-remarks
133133
attributes:
134-
label: Other Steps to Reproduce
134+
label: Other Steps to Reproduce
135135
description: Is there any other information you can think of which will help us reproduce this problem? Any additional info can be added as well.
136136
placeholder: ex. I also tried on other OS, HW...it works correctly on that setup.
137137
- type: checkboxes

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ contact_links:
55
about: Community channel for questions and help
66
- name: ESP32 Forum - Arduino
77
url: https://esp32.com/viewforum.php?f=19
8-
about: Official Forum for questions
8+
about: Official Forum for questions

.github/scripts/find_new_boards.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ do
3434
addition_line=$( echo "${params_array[c+1]}" | cut -d'+' -f2 | cut -d',' -f1 )
3535
addition_count=$( echo "${params_array[c+1]}" | cut -d'+' -f2 | cut -d',' -f2 | cut -d' ' -f1 )
3636
addition_end=$(($addition_line+$addition_count))
37-
37+
3838
addition_line=$(($addition_line + 3))
3939
addition_end=$(($addition_end - $deletion_count))
4040

@@ -87,4 +87,4 @@ then
8787
echo "FQBNS=${json_matrix}" >> $GITHUB_ENV
8888
else
8989
echo "FQBNS=" >> $GITHUB_ENV
90-
fi
90+
fi

.github/scripts/install-arduino-cli.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,3 @@ if [ ! -d "$ARDUINO_IDE_PATH" ] || [ ! -f "$ARDUINO_IDE_PATH/arduino-cli" ]; the
4343
mkdir -p "$ARDUINO_IDE_PATH"
4444
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR="$ARDUINO_IDE_PATH" sh
4545
fi
46-

.github/scripts/install-arduino-ide.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,3 @@ if [ ! -d "$ARDUINO_IDE_PATH" ]; then
7777
echo "Arduino IDE Installed in '$ARDUINO_IDE_PATH'"
7878
echo ""
7979
fi
80-

.github/scripts/merge_packages.py

Lines changed: 32 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,18 @@
1010
import json
1111
import sys
1212

13+
1314
def load_package(filename):
14-
pkg = json.load(open(filename))['packages'][0]
15-
print("Loaded package {0} from {1}".format(pkg['name'], filename), file=sys.stderr)
16-
print("{0} platform(s), {1} tools".format(len(pkg['platforms']), len(pkg['tools'])), file=sys.stderr)
15+
pkg = json.load(open(filename))["packages"][0]
16+
print("Loaded package {0} from {1}".format(pkg["name"], filename), file=sys.stderr)
17+
print("{0} platform(s), {1} tools".format(len(pkg["platforms"]), len(pkg["tools"])), file=sys.stderr)
1718
return pkg
1819

20+
1921
def merge_objects(versions, obj):
2022
for o in obj:
21-
name = o['name'].encode('ascii')
22-
ver = o['version'].encode('ascii')
23+
name = o["name"].encode("ascii")
24+
ver = o["version"].encode("ascii")
2325
if not name in versions:
2426
print("found new object, {0}".format(name), file=sys.stderr)
2527
versions[name] = {}
@@ -28,22 +30,23 @@ def merge_objects(versions, obj):
2830
versions[name][ver] = o
2931
return versions
3032

33+
3134
# Normalize ESP release version string (x.x.x) by adding '-rc<MAXINT>' (x.x.x-rc9223372036854775807) to ensure having REL above any RC
3235
# Dummy approach, functional anyway for current ESP package versioning (unlike NormalizedVersion/LooseVersion/StrictVersion & similar crap)
3336
def pkgVersionNormalized(versionString):
3437

3538
verStr = str(versionString)
36-
verParts = re.split('\.|-rc', verStr, flags=re.IGNORECASE)
37-
39+
verParts = re.split("\.|-rc", verStr, flags=re.IGNORECASE)
40+
3841
if len(verParts) == 3:
39-
if (sys.version_info > (3, 0)): # Python 3
40-
verStr = str(versionString) + '-rc' + str(sys.maxsize)
41-
else: # Python 2
42-
verStr = str(versionString) + '-rc' + str(sys.maxint)
43-
42+
if sys.version_info > (3, 0): # Python 3
43+
verStr = str(versionString) + "-rc" + str(sys.maxsize)
44+
else: # Python 2
45+
verStr = str(versionString) + "-rc" + str(sys.maxint)
46+
4447
elif len(verParts) != 4:
4548
print("pkgVersionNormalized WARNING: unexpected version format: {0})".format(verStr), file=sys.stderr)
46-
49+
4750
return verStr
4851

4952

@@ -53,30 +56,33 @@ def main(args):
5356
return 1
5457

5558
tools = {}
56-
platforms = {}
59+
platforms = {}
5760
pkg1 = load_package(args[1])
58-
tools = merge_objects(tools, pkg1['tools']);
59-
platforms = merge_objects(platforms, pkg1['platforms']);
61+
tools = merge_objects(tools, pkg1["tools"])
62+
platforms = merge_objects(platforms, pkg1["platforms"])
6063
pkg2 = load_package(args[2])
61-
tools = merge_objects(tools, pkg2['tools']);
62-
platforms = merge_objects(platforms, pkg2['platforms']);
64+
tools = merge_objects(tools, pkg2["tools"])
65+
platforms = merge_objects(platforms, pkg2["platforms"])
6366

64-
pkg1['tools'] = []
65-
pkg1['platforms'] = []
67+
pkg1["tools"] = []
68+
pkg1["platforms"] = []
6669

6770
for name in tools:
6871
for version in tools[name]:
6972
print("Adding tool {0}-{1}".format(name, version), file=sys.stderr)
70-
pkg1['tools'].append(tools[name][version])
73+
pkg1["tools"].append(tools[name][version])
7174

7275
for name in platforms:
7376
for version in platforms[name]:
7477
print("Adding platform {0}-{1}".format(name, version), file=sys.stderr)
75-
pkg1['platforms'].append(platforms[name][version])
76-
77-
pkg1['platforms'] = sorted(pkg1['platforms'], key=lambda k: LooseVersion(pkgVersionNormalized(k['version'])), reverse=True)
78+
pkg1["platforms"].append(platforms[name][version])
79+
80+
pkg1["platforms"] = sorted(
81+
pkg1["platforms"], key=lambda k: LooseVersion(pkgVersionNormalized(k["version"])), reverse=True
82+
)
83+
84+
json.dump({"packages": [pkg1]}, sys.stdout, indent=2)
7885

79-
json.dump({'packages':[pkg1]}, sys.stdout, indent=2)
8086

81-
if __name__ == '__main__':
87+
if __name__ == "__main__":
8288
sys.exit(main(sys.argv))

.github/scripts/sketch_utils.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ function build_sketch(){ # build_sketch <ide_path> <user_path> <path-to-ino> [ex
131131
echo "Skipping $sketchname for target $target"
132132
exit 0
133133
fi
134-
134+
135135
ARDUINO_CACHE_DIR="$HOME/.arduino/cache.tmp"
136136
if [ -n "$ARDUINO_BUILD_DIR" ]; then
137137
build_dir="$ARDUINO_BUILD_DIR"
@@ -164,7 +164,7 @@ function build_sketch(){ # build_sketch <ide_path> <user_path> <path-to-ino> [ex
164164
--build-cache-path "$ARDUINO_CACHE_DIR" \
165165
--build-path "$build_dir" \
166166
$xtra_opts "${sketchdir}"
167-
167+
168168
exit_status=$?
169169
if [ $exit_status -ne 0 ]; then
170170
echo ""ERROR: Compilation failed with error code $exit_status""
@@ -388,4 +388,3 @@ case "$cmd" in
388388
echo "$USAGE"
389389
exit 2
390390
esac
391-

.github/scripts/tests_build.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,3 @@ else
6161
fi
6262

6363
${BUILD_CMD} ${args} $*
64-

.github/workflows/allboards.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ jobs:
2020
ref: ${{ github.event.client_payload.branch }}
2121

2222
- name: Get boards fqbns
23-
run:
24-
bash .github/scripts/find_all_boards.sh
23+
run: bash .github/scripts/find_all_boards.sh
2524

2625
setup-chunks:
2726
needs: find-boards
@@ -43,8 +42,7 @@ jobs:
4342

4443
- id: set-test-chunks
4544
name: Set Chunks
46-
run:
47-
echo "test-chunks<<EOF" >> $GITHUB_OUTPUT
45+
run: echo "test-chunks<<EOF" >> $GITHUB_OUTPUT
4846

4947
echo "$( jq -nc '${{ needs.find-boards.outputs.fqbns }} | [_nwise( ${{ needs.find-boards.outputs.board-count }}/15 | ceil)]')" >> $GITHUB_OUTPUT
5048

@@ -61,7 +59,7 @@ jobs:
6159
6260
strategy:
6361
fail-fast: false
64-
matrix:
62+
matrix:
6563
chunk: ${{ fromJSON(needs.setup-chunks.outputs['test-chunks']) }}
6664

6765
steps:
@@ -71,9 +69,8 @@ jobs:
7169
ref: ${{ github.event.client_payload.branch }}
7270

7371
- name: Echo FQBNS to file
74-
run:
75-
echo "$FQBN" > fqbns.json
76-
env:
72+
run: echo "$FQBN" > fqbns.json
73+
env:
7774
FQBN: ${{ toJSON(matrix.chunk) }}
7875

7976
- name: Compile sketch
@@ -88,5 +85,4 @@ jobs:
8885
enable-warnings-report: false
8986
cli-compile-flags: |
9087
- --warnings="all"
91-
sketch-paths:
92-
"- ./libraries/ESP32/examples/CI/CIBoardsTest/CIBoardsTest.ino"
88+
sketch-paths: "- ./libraries/ESP32/examples/CI/CIBoardsTest/CIBoardsTest.ino"

.github/workflows/boards.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ jobs:
2424
uses: dcarbone/install-jq-action@v1.0.1
2525

2626
- name: Get board name
27-
run:
28-
bash .github/scripts/find_new_boards.sh ${{ github.repository }} ${{github.event.number}}
27+
run: bash .github/scripts/find_new_boards.sh ${{ github.repository }} ${{github.event.number}}
2928

3029
test-boards:
3130
needs: find-boards
@@ -67,5 +66,4 @@ jobs:
6766
cli-compile-flags: |
6867
- --warnings="all"
6968
exit-on-fail: true
70-
sketch-paths:
71-
"- ./libraries/ESP32/examples/CI/CIBoardsTest/CIBoardsTest.ino"
69+
sketch-paths: "- ./libraries/ESP32/examples/CI/CIBoardsTest/CIBoardsTest.ino"

0 commit comments

Comments
 (0)