dodoyy commited on
Commit
bf353ec
Β·
verified Β·
1 Parent(s): ff8fb9c

Restore pre-Arrow SVG validation

Browse files
Files changed (1) hide show
  1. validator.py +0 -7
validator.py CHANGED
@@ -47,7 +47,6 @@ ELEMENTS = {
47
  TIMING = {
48
  "attributeName", "values", "from", "to", "by", "dur", "begin",
49
  "repeatCount", "fill", "calcMode", "keyTimes", "keySplines",
50
- "additive", "accumulate", "attributeType",
51
  }
52
  ANIMATIONS = {
53
  "animate": TIMING,
@@ -119,12 +118,6 @@ def _validate_animation(element: ET.Element, kind: str, parent: str | None) -> N
119
  raise SVGError("μ• λ‹ˆλ©”μ΄μ…˜ 반볡 횟수λ₯Ό 확인해 μ£Όμ„Έμš”.")
120
  if element.get("fill", "remove") not in {"freeze", "remove"}:
121
  raise SVGError("μ• λ‹ˆλ©”μ΄μ…˜ μ’…λ£Œ μƒνƒœλ₯Ό 확인해 μ£Όμ„Έμš”.")
122
- if element.get("additive", "replace") not in {"replace", "sum"}:
123
- raise SVGError("μ§€μ›ν•˜μ§€ μ•ŠλŠ” μ• λ‹ˆλ©”μ΄μ…˜ ν•©μ„± λ°©μ‹μž…λ‹ˆλ‹€.")
124
- if element.get("accumulate", "none") not in {"none", "sum"}:
125
- raise SVGError("μ§€μ›ν•˜μ§€ μ•ŠλŠ” μ• λ‹ˆλ©”μ΄μ…˜ λˆ„μ  λ°©μ‹μž…λ‹ˆλ‹€.")
126
- if element.get("attributeType", "auto") not in {"auto", "XML"}:
127
- raise SVGError("SVG XML 속성에 μ μš©λ˜λŠ” μ• λ‹ˆλ©”μ΄μ…˜μ΄ ν•„μš”ν•©λ‹ˆλ‹€.")
128
  value_attrs = {"values", "from", "to", "by"}
129
  if kind == "animateMotion":
130
  value_attrs.add("path")
 
47
  TIMING = {
48
  "attributeName", "values", "from", "to", "by", "dur", "begin",
49
  "repeatCount", "fill", "calcMode", "keyTimes", "keySplines",
 
50
  }
51
  ANIMATIONS = {
52
  "animate": TIMING,
 
118
  raise SVGError("μ• λ‹ˆλ©”μ΄μ…˜ 반볡 횟수λ₯Ό 확인해 μ£Όμ„Έμš”.")
119
  if element.get("fill", "remove") not in {"freeze", "remove"}:
120
  raise SVGError("μ• λ‹ˆλ©”μ΄μ…˜ μ’…λ£Œ μƒνƒœλ₯Ό 확인해 μ£Όμ„Έμš”.")
 
 
 
 
 
 
121
  value_attrs = {"values", "from", "to", "by"}
122
  if kind == "animateMotion":
123
  value_attrs.add("path")