Skip to content

Commit

Permalink
adding a type to the documentation_type_data
Browse files Browse the repository at this point in the history
  • Loading branch information
AsherGlick committed Sep 30, 2023
1 parent 0272d78 commit bbd1c60
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions xml_converter/generators/code_generator.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from jsonschema import validate # type:ignore
from jsonschema.exceptions import ValidationError # type:ignore
import frontmatter # type:ignore
from typing import Any, Dict, List, Tuple, Set, Optional, Final
from typing import Any, Dict, List, Tuple, Set, Optional, Final, TypedDict
import os
import markdown
from dataclasses import dataclass, field
Expand Down Expand Up @@ -104,7 +104,20 @@ class FieldRow:
description: str


documentation_type_data = {
################################################################################
# DocumentationTypeData
#
# A type definition to indicate what information should be included in the
# documentation_type_data variable.
################################################################################
class DocumentationTypeData(TypedDict):
class_name: str
cpp_type: str


# A map between the documentation types, and useful class name info related to
# that type.
documentation_type_data: Dict[str, DocumentationTypeData] = {
"Fixed32": {
"class_name": "int",
"cpp_type": "int",
Expand Down

0 comments on commit bbd1c60

Please sign in to comment.