Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
rpitasky authored Aug 21, 2024
1 parent 46ad13f commit 4213ae2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# TI Toolkit Token Sheets

Here you can find token sheets for the TI-73 and TI-83/84-series calculators to include in external projects. The sheets contain detailed information about every token in a simple XML format. Basic scripts for parsing the sheets are also included.
Here you can find token sheets for the TI-83/84-series calculators to include in external projects. The sheets contain detailed information about every token in a simple XML format. Basic scripts for parsing the sheets are also included.

## How to Use

Expand All @@ -10,7 +10,7 @@ You can also manually include a download of the sheets and/or scripts as needed.

## XML Format

The XML format for `8X.xml` is outlined below; `73.xml` follows a similar schema.
The XML format for `8X.xml` is outlined below.

#### Tokens

Expand Down
7 changes: 6 additions & 1 deletion scripts/formats.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from .parse import OsVersion, OsVersions


def validate(root: ET.Element, *) -> int:
def validate(root: ET.Element) -> int:
"""
Validates a token sheet, raising an error if an invalid component is found
Expand Down Expand Up @@ -82,6 +82,11 @@ def text(regex: str):
children(r"<since>(<until>)?(<lang>)+")

case "since":
if (this_version := OsVersion.from_element(element)) < version:
raise ValidationError(f"version {this_version} overlaps with {version}")

version = this_version

# Workaround for nested defaultdict
all_names[version] = all_names.get(version, defaultdict(set))

Expand Down

0 comments on commit 4213ae2

Please sign in to comment.