diff --git a/src/scripts/gendoc/doc_enum.template b/src/scripts/gendoc/doc_enum.template index bdbb37a527..f7a11ee6c4 100644 --- a/src/scripts/gendoc/doc_enum.template +++ b/src/scripts/gendoc/doc_enum.template @@ -33,7 +33,7 @@ enum { typedef enum { - ${field.c_name}$ = ${field.value.serialize}$, + ${field.c_constant}$ = ${field.value.serialize}$, } ${enum.name.replace('.', '_')}$; diff --git a/src/scripts/gendoc/doc_macros.include b/src/scripts/gendoc/doc_macros.include index 64b5311e5a..507693179a 100644 --- a/src/scripts/gendoc/doc_macros.include +++ b/src/scripts/gendoc/doc_macros.include @@ -178,8 +178,8 @@ interface#! #!#### FUNC_SCOPE(func) ###################################################### #!############################################################################## - - ''class method'' #! + + ''static method'' #! diff --git a/src/scripts/gendoc/gendoc.py b/src/scripts/gendoc/gendoc.py index 2ebaa605d4..bee5161f0b 100755 --- a/src/scripts/gendoc/gendoc.py +++ b/src/scripts/gendoc/gendoc.py @@ -41,7 +41,7 @@ _choices = ['start', 'classes', 'enums', 'structs', 'aliases'] parser.add_argument('--step', '-s', metavar='STEP', default=None, choices=_choices, help='A single step to run (default to all), ' - 'valid choices: '+ ', '.join(_choices)) + 'valid choices: ' + ', '.join(_choices)) args = parser.parse_args() @@ -64,6 +64,8 @@ if not eolian_db.all_eo_files_parse(): def cleanup_db(): global eolian_db del eolian_db + + atexit.register(cleanup_db) @@ -72,14 +74,14 @@ def page_path_for_object(obj): path = ['data', 'pages', 'develop', 'api'] for ns in obj.namespaces: path.append(ns.lower()) - output_file = obj.short_name.lower() + '.txt' - return os.path.join(args.root_path, *path, output_file) + output_filename = obj.short_name.lower() + '.txt' + return os.path.join(args.root_path, *path, output_filename) # render a (temporary) page for analizying the namespaces hierarchy t = Template('namespaces.template') -nspaces = [ ns for ns in eolian_db.all_namespaces - if ns.name.startswith(args.namespace) ] +nspaces = [ns for ns in eolian_db.all_namespaces + if ns.name.startswith(args.namespace)] tot_classes = tot_regulars = tot_abstracts = tot_mixins = tot_ifaces = 0 tot_enums = tot_structs = tot_aliases = 0 @@ -113,7 +115,7 @@ totals = [ root_ns = eolian_db.namespace_get_by_name(args.namespace) -output_file = os.path.join(args.root_path,'data','pages','develop','api','namespaces.txt') +output_file = os.path.join(args.root_path, 'data', 'pages', 'develop', 'api', 'namespaces.txt') t.render(output_file, args.verbose, root_ns=root_ns, totals=totals) @@ -121,10 +123,10 @@ t.render(output_file, args.verbose, root_ns=root_ns, totals=totals) if args.step in ('start', None): t = Template('doc_start.template') - nspaces = [ ns for ns in eolian_db.all_namespaces - if ns.name.startswith(args.namespace) ] + nspaces = [ns for ns in eolian_db.all_namespaces + if ns.name.startswith(args.namespace)] - output_file = os.path.join(args.root_path,'data','pages','develop','api','start.txt') + output_file = os.path.join(args.root_path, 'data', 'pages', 'develop', 'api', 'start.txt') t.render(output_file, args.verbose, nspaces=nspaces) diff --git a/src/scripts/pyolian/eolian.py b/src/scripts/pyolian/eolian.py index 2c23fa2c5b..a8b77e15e9 100644 --- a/src/scripts/pyolian/eolian.py +++ b/src/scripts/pyolian/eolian.py @@ -1154,7 +1154,7 @@ class Typedecl(Object): class Enum_Type_Field(Object): def __repr__(self): - return "".format(self) + return "".format(self) @cached_property def c_constant(self): diff --git a/src/scripts/pyolian/generator.py b/src/scripts/pyolian/generator.py index 0b7e8024e3..28138f531f 100755 --- a/src/scripts/pyolian/generator.py +++ b/src/scripts/pyolian/generator.py @@ -141,7 +141,7 @@ class Template(pyratemp.Template): 'Eolian_Typedecl_Type': eolian.Eolian_Typedecl_Type, 'Eolian_Type_Type': eolian.Eolian_Type_Type, 'Eolian_Type_Builtin_Type': eolian.Eolian_Type_Builtin_Type, - 'Eolian_C_Type_Type': eolian.Eolian_C_Type_Type, + # 'Eolian_C_Type_Type': eolian.Eolian_C_Type_Type, 'Eolian_Expression_Type': eolian.Eolian_Expression_Type, 'Eolian_Expression_Mask': eolian.Eolian_Expression_Mask, 'Eolian_Binary_Operator': eolian.Eolian_Binary_Operator, diff --git a/src/scripts/pyolian/test_gen_class.template b/src/scripts/pyolian/test_gen_class.template index cc0e845ab5..d53ae823e5 100644 --- a/src/scripts/pyolian/test_gen_class.template +++ b/src/scripts/pyolian/test_gen_class.template @@ -3,8 +3,7 @@ Class: ${cls.name}$ (${cls.short_name}$) ================================================================================ Class type: ${cls.type}$ -Base Class: ${cls.base_class.name if cls.base_class else None}$ -Inherits: ${', '.join([i.name for i in cls.inherits])}$ +Parent: ${cls.parent.name if cls.parent else None}$ Hierarchy: ${' => '.join([i.name for i in cls.hierarchy])}$ InheritsFull: ${', '.join([i.name for i in cls.inherits_full])}$ Namespace: ${cls.namespace}$ diff --git a/src/scripts/pyolian/test_gen_namespace.template b/src/scripts/pyolian/test_gen_namespace.template index 8cdb4f7ca7..27e6dcb533 100644 --- a/src/scripts/pyolian/test_gen_namespace.template +++ b/src/scripts/pyolian/test_gen_namespace.template @@ -59,7 +59,7 @@ Enums: * ${typedecl.name}$ - ${field.c_name}$ = ${field.value.serialize}$ + ${field.c_constant}$ = ${field.value.serialize}$ no enums available