Skip to content

Commit 6a15df1

Browse files
committed
Update spec lock file
1 parent fd78527 commit 6a15df1

File tree

2 files changed

+10767
-10718
lines changed

2 files changed

+10767
-10718
lines changed

exts/coding_guidelines/fls_checks.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -452,14 +452,15 @@ def format_affected_guidelines(fls_id):
452452
detailed_differences.append(f"{guideline_id}: {info['title']}")
453453
detailed_differences.append(f" Changed FLS paragraphs: {', '.join(changed_fls)}")
454454

455-
temp_file = None
456-
try:
457-
with tempfile.NamedTemporaryFile(mode='w', delete=False, prefix='fls_diff_', suffix='.txt') as temp_file:
458-
temp_file.write("\n".join(detailed_differences))
459-
temp_path = temp_file.name
460-
logger.warning(f"Detailed FLS differences written to: {temp_path}")
461-
except Exception as e:
462-
logger.error(f"Failed to write detailed differences to temp file: {e}")
455+
if has_differences:
456+
temp_file = None
457+
try:
458+
with tempfile.NamedTemporaryFile(mode='w', delete=False, prefix='fls_diff_', suffix='.txt') as temp_file:
459+
temp_file.write("\n".join(detailed_differences))
460+
temp_path = temp_file.name
461+
logger.warning(f"Detailed FLS differences written to: {temp_path}")
462+
except Exception as e:
463+
logger.error(f"Failed to write detailed differences to temp file: {e}")
463464

464465
# Create concise summary for return
465466
summary = []

0 commit comments

Comments
 (0)