Skip to content

Commit c08a8d8

Browse files
chore: update .prettierignore and format imports in index.ts for consistency
1 parent af16740 commit c08a8d8

File tree

3 files changed

+33
-22
lines changed

3 files changed

+33
-22
lines changed

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
dist
22
node_modules
33
coverage
4+
examples/coexistence/dependabot.yml
5+
examples/guarded/.github/workflows/python-version-patch.yml

examples/guarded/.github/workflows/python-version-patch.yml

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -66,30 +66,34 @@ jobs:
6666
fi
6767
6868
python - <<'PY'
69-
import os
70-
import sys
71-
import urllib.request
69+
import os
70+
import sys
71+
import urllib.request
7272
73-
version = os.environ['NEW_VERSION']
74-
keywords = [kw.strip().lower() for kw in os.environ.get('SECURITY_KEYWORDS', '').split(',') if kw.strip()]
75-
if not keywords:
76-
sys.exit(0)
73+
version = os.environ['NEW_VERSION']
74+
keywords = [
75+
kw.strip().lower()
76+
for kw in os.environ.get('SECURITY_KEYWORDS', '').split(',')
77+
if kw.strip()
78+
]
79+
if not keywords:
80+
sys.exit(0)
7781
78-
slug = 'python-' + version.replace('.', '')
79-
url = f'https://www.python.org/downloads/release/{slug}/'
80-
print(f'Fetching release notes from {url}')
81-
try:
82-
with urllib.request.urlopen(url, timeout=30) as response:
83-
body = response.read().decode('utf-8', errors='replace').lower()
84-
except Exception as exc: # noqa: BLE001
85-
print(f'Failed to fetch release notes: {exc}')
86-
sys.exit(1)
82+
slug = 'python-' + version.replace('.', '')
83+
url = f'https://www.python.org/downloads/release/{slug}/'
84+
print(f'Fetching release notes from {url}')
85+
try:
86+
with urllib.request.urlopen(url, timeout=30) as response:
87+
body = response.read().decode('utf-8', errors='replace').lower()
88+
except Exception as exc: # noqa: BLE001
89+
print(f'Failed to fetch release notes: {exc}')
90+
sys.exit(1)
8791
88-
if any(keyword in body for keyword in keywords):
89-
print('Security keyword detected in release notes.')
90-
else:
91-
print('No security keywords found; aborting update.')
92-
sys.exit(1)
92+
if any(keyword in body for keyword in keywords):
93+
print('Security keyword detected in release notes.')
94+
else:
95+
print('No security keywords found; aborting update.')
96+
sys.exit(1)
9397
PY
9498

9599
- name: Apply CPython patch update

src/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@ import {
1717
fetchReleaseNotes,
1818
resolveLatestPatch,
1919
} from './versioning';
20-
import { createBranchAndCommit, createOrUpdatePullRequest, findExistingPullRequest, pushBranch } from './git';
20+
import {
21+
createBranchAndCommit,
22+
createOrUpdatePullRequest,
23+
findExistingPullRequest,
24+
pushBranch,
25+
} from './git';
2126
import { validateTrack } from './config';
2227
import type { StableTag } from './github';
2328

0 commit comments

Comments
 (0)