Skip to content

Commit ae72094

Browse files
ci: fix Python lint and npm install in tests workflow
Apply f-string fix from gyp-next#337 to resolve ruff F507 in simple_copy.py, and add npm@~11.10.0 pre-install step from nodejs#3300 to work around npm/cli#9151.
1 parent f86045e commit ae72094

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/tests.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ jobs:
6767
with:
6868
node-version: 22.x
6969
- name: Update npm
70-
run: npm install npm@latest -g
70+
run: |
71+
npm install npm@~11.10.0 -g # Workaround for https://github.com/npm/cli/issues/9151
72+
npm install npm@latest -g
7173
- name: Install Dependencies
7274
run: npm install
7375
- name: Pack

gyp/pylib/gyp/simple_copy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ def deepcopy(x):
2424
return _deepcopy_dispatch[type(x)](x)
2525
except KeyError:
2626
raise Error(
27-
"Unsupported type %s for deepcopy. Use copy.deepcopy "
28-
+ "or expand simple_copy support." % type(x)
27+
f"Unsupported type {type(x)} for deepcopy. Use copy.deepcopy "
28+
+ "or expand simple_copy support."
2929
)
3030

3131

0 commit comments

Comments
 (0)