fix: Address high-severity bandit issues
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Example 1: Basic Token Ingestion
|
||||
Example 1: Basic Token Ingestion.
|
||||
|
||||
Shows how to ingest design tokens from different sources.
|
||||
"""
|
||||
@@ -62,19 +62,18 @@ async def main():
|
||||
# 3. JSON Tokens (W3C Format)
|
||||
print("\n3. JSON Design Tokens (W3C)")
|
||||
print("-" * 40)
|
||||
from tools.ingest.json_tokens import JSONTokenSource
|
||||
import json
|
||||
|
||||
from tools.ingest.json_tokens import JSONTokenSource
|
||||
|
||||
json_content = {
|
||||
"color": {
|
||||
"primary": {
|
||||
"500": {"value": "#3B82F6", "type": "color"},
|
||||
"600": {"value": "#2563EB", "type": "color"}
|
||||
"600": {"value": "#2563EB", "type": "color"},
|
||||
}
|
||||
},
|
||||
"spacing": {
|
||||
"md": {"value": "16px", "type": "dimension"}
|
||||
}
|
||||
"spacing": {"md": {"value": "16px", "type": "dimension"}},
|
||||
}
|
||||
|
||||
json_parser = JSONTokenSource()
|
||||
@@ -85,7 +84,9 @@ async def main():
|
||||
print(f" {token.name} = {token.value} ({token.type.value})")
|
||||
|
||||
print("\n" + "=" * 60)
|
||||
print(f"Total tokens extracted: {len(css_result.tokens) + len(scss_result.tokens) + len(json_result.tokens)}")
|
||||
print(
|
||||
f"Total tokens extracted: {len(css_result.tokens) + len(scss_result.tokens) + len(json_result.tokens)}"
|
||||
)
|
||||
print("=" * 60)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user