Skip to content

Commit 662fa66

Browse files
committed
resolve merge main conflicts. add new json files to gitignore. resolve pylint issues
1 parent 0301b12 commit 662fa66

File tree

3 files changed

+19
-13
lines changed

3 files changed

+19
-13
lines changed

Diff for: .gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
__pycache__
66
latest_bundle_data.json
77
latest_bundle_tag.json
8+
latest_community_bundle_data.json
9+
latest_community_bundle_tag.json
810
generated_images
911

1012
# Virtual environment-specific files

Diff for: create_requirement_images.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,8 @@
4141
with open("latest_bundle_data.json", "r", encoding="utf-8") as f:
4242
bundle_data = json.load(f)
4343

44-
f = open("latest_community_bundle_data.json", "r")
45-
community_bundle_data = json.load(f)
46-
f.close()
44+
with open("latest_community_bundle_data.json", "r", encoding="utf-8") as f:
45+
community_bundle_data = json.load(f)
4746

4847

4948
def asset_path(asset_name):

Diff for: get_imports.py

+15-10
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
COMMUNITY_BUNDLE_DATA = "latest_community_bundle_data.json"
2020
COMMUNITY_BUNDLE_TAG = "latest_community_bundle_tag.json"
2121

22-
ADAFRUIT_BUNDLE_S3_URL = "https://adafruit-circuit-python.s3.amazonaws.com/bundles/adafruit/adafruit-circuitpython-bundle-{tag}.json"
23-
COMMUNITY_BUNDLE_S3_URL = "https://adafruit-circuit-python.s3.amazonaws.com/bundles/community/circuitpython-community-bundle-{tag}.json"
22+
ADAFRUIT_BUNDLE_S3_URL = "https://adafruit-circuit-python.s3.amazonaws.com/bundles/adafruit/adafruit-circuitpython-bundle-{tag}.json" # pylint: disable=line-too-long
23+
COMMUNITY_BUNDLE_S3_URL = "https://adafruit-circuit-python.s3.amazonaws.com/bundles/community/circuitpython-community-bundle-{tag}.json" # pylint: disable=line-too-long
2424

2525
LEARN_GUIDE_REPO = os.environ.get(
2626
"LEARN_GUIDE_REPO", "../Adafruit_Learning_System_Guides/"
@@ -44,7 +44,6 @@
4444

4545
def get_bundle(bundle_url, bundle_data_file):
4646
"""Download the Adafruit and Community bundles data"""
47-
#url = f"https://adafruit-circuit-python.s3.amazonaws.com/bundles/adafruit/adafruit-circuitpython-bundle-{tag}.json" # pylint: disable=line-too-long
4847
print(f"get bundle metadata from {bundle_url}")
4948
r = requests.get(bundle_url)
5049
with open(bundle_data_file, "wb") as bundle_file:
@@ -113,17 +112,23 @@ def ensure_latest_bundle(bundle_url, bundle_s3_url, bundle_tag_file, bundle_data
113112
print(f"Current library bundle up to date {tag}")
114113

115114

116-
ensure_latest_bundle("https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases/latest",
117-
ADAFRUIT_BUNDLE_S3_URL,
118-
ADAFRUIT_BUNDLE_TAG, ADAFRUIT_BUNDLE_DATA)
119-
ensure_latest_bundle("https://github.com/adafruit/CircuitPython_Community_Bundle/releases/latest",
120-
COMMUNITY_BUNDLE_S3_URL,
121-
COMMUNITY_BUNDLE_TAG, COMMUNITY_BUNDLE_DATA)
115+
ensure_latest_bundle(
116+
"https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases/latest",
117+
ADAFRUIT_BUNDLE_S3_URL,
118+
ADAFRUIT_BUNDLE_TAG,
119+
ADAFRUIT_BUNDLE_DATA,
120+
)
121+
ensure_latest_bundle(
122+
"https://github.com/adafruit/CircuitPython_Community_Bundle/releases/latest",
123+
COMMUNITY_BUNDLE_S3_URL,
124+
COMMUNITY_BUNDLE_TAG,
125+
COMMUNITY_BUNDLE_DATA,
126+
)
122127

123128
with open(ADAFRUIT_BUNDLE_DATA, "r", encoding="utf-8") as f:
124129
bundle_data = json.load(f)
125130

126-
with open(COMMUNITY_BUNDLE_DATA, "r") as f:
131+
with open(COMMUNITY_BUNDLE_DATA, "r", encoding="utf-8") as f:
127132
community_bundle_data = json.load(f)
128133

129134

0 commit comments

Comments
 (0)