Skip to content

Commit

Permalink
Merge pull request #384 from m4rc1e/schema-fix
Browse files Browse the repository at this point in the history
Builder schema: Allow floats in STAT table
  • Loading branch information
m4rc1e authored Jul 1, 2021
2 parents 8b53f59 + 47d3741 commit cfc091f
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions Lib/gftools/builder/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
MapPattern,
Str,
Int,
Float,
Seq,
YAMLError,
Optional,
Expand All @@ -21,11 +22,11 @@
"values": Seq(
Map({
"name": Str(),
"value": Int(),
Optional("nominalValue"): Int(),
Optional("linkedValue"): Int(),
Optional("rangeMinValue"): Int(),
Optional("rangeMaxValue"): Int(),
"value": Int() | Float(),
Optional("nominalValue"): Int() | Float(),
Optional("linkedValue"): Int() | Float(),
Optional("rangeMinValue"): Int() | Float(),
Optional("rangeMaxValue"): Int() | Float(),
Optional("flags"): Int()
})
)
Expand All @@ -36,15 +37,15 @@
Map({
"name": Str(),
Optional("flags"): Int(),
"location": MapPattern(Str(), Int()),
"location": MapPattern(Str(), Int() | Float()),
})
)

instance_schema = MapPattern(Str(), Seq(
Map({
Optional("familyName"): Str(),
Optional("styleName"): Str(),
"coordinates": MapPattern(Str(), Int()),
"coordinates": MapPattern(Str(), Int() | Float()),
})
))

Expand Down

0 comments on commit cfc091f

Please sign in to comment.