Skip to content

Commit 74f5d48

Browse files
committed
Fix linting issues: remove unused imports and variables
1 parent 9879f59 commit 74f5d48

File tree

5 files changed

+10
-13
lines changed

5 files changed

+10
-13
lines changed

cli/xml_lib/assertions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import json
55
from datetime import datetime
66
from pathlib import Path
7-
from typing import List, Optional, TYPE_CHECKING
7+
from typing import List, TYPE_CHECKING
88
from lxml import etree
99
from cryptography.hazmat.primitives import hashes, serialization
1010
from cryptography.hazmat.primitives.asymmetric import padding, rsa

cli/xml_lib/guardrails.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import re
44
from dataclasses import dataclass, field
5-
from datetime import datetime
65
from pathlib import Path
76
from typing import Any, Dict, List, Optional
87
from lxml import etree
@@ -127,7 +126,7 @@ def validate(self, project_path: Path) -> GuardrailResult:
127126
violations = self._check_rule(doc, xml_file, rule)
128127
result.errors.extend(violations)
129128

130-
except Exception as e:
129+
except Exception:
131130
# Skip files that can't be parsed
132131
continue
133132

@@ -155,7 +154,7 @@ def _check_rule(
155154
# Cross-file checks require multiple documents - skip for now
156155
pass
157156

158-
except Exception as e:
157+
except Exception:
159158
# Rule execution failed - log but don't fail validation
160159
pass
161160

@@ -195,7 +194,7 @@ def _check_xpath(
195194
)
196195
)
197196

198-
except Exception as e:
197+
except Exception:
199198
# XPath evaluation failed
200199
pass
201200

cli/xml_lib/pptx_composer.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
"""OOXML composer that maps XML guidance to PowerPoint presentations."""
22

33
from dataclasses import dataclass
4-
from datetime import datetime
54
from pathlib import Path
6-
from typing import Dict, List, Optional
5+
from typing import List, Optional
76
from lxml import etree
87
from pptx import Presentation
9-
from pptx.util import Inches, Pt
10-
from pptx.enum.text import PP_ALIGN
8+
from pptx.util import Pt
119

1210
from xml_lib.telemetry import TelemetrySink
1311

@@ -193,7 +191,7 @@ def _render_summary(self, summary: etree._Element, prs: Presentation) -> None:
193191
next_action = summary.find("next-action")
194192
if next_action is not None and next_action.text:
195193
content_lines.append("")
196-
content_lines.append(f"Next Action:")
194+
content_lines.append("Next Action:")
197195
content_lines.append(f" {next_action.text}")
198196

199197
# Set body text

cli/xml_lib/telemetry.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
import json
44
import sqlite3
55
from abc import ABC, abstractmethod
6-
from dataclasses import asdict, dataclass
6+
from dataclasses import dataclass
77
from datetime import datetime
88
from pathlib import Path
9-
from typing import Any, Dict, Optional
9+
from typing import Any, Dict
1010

1111
try:
1212
import psycopg2

cli/xml_lib/validator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def _validate_relaxng(
172172

173173
try:
174174
self.relaxng_lifecycle.assertValid(doc)
175-
except etree.DocumentInvalid as e:
175+
except etree.DocumentInvalid:
176176
# Try guardrails schema if lifecycle fails
177177
if self.relaxng_guardrails:
178178
try:

0 commit comments

Comments
 (0)