diff --git a/docs/refman/generatorbase.py b/docs/refman/generatorbase.py index e4041747b..e93166ff0 100644 --- a/docs/refman/generatorbase.py +++ b/docs/refman/generatorbase.py @@ -37,7 +37,7 @@ class GeneratorBase(metaclass=ABCMeta): @staticmethod def sorted_and_filtered(raw: T.List[_N]) -> T.List[_N]: - def key_fn(fn: Function) -> str: + def key_fn(fn: NamedObject) -> str: if isinstance(fn, Method): return f'1_{fn.obj.name}.{fn.name}' return f'0_{fn.name}' diff --git a/docs/refman/generatormd.py b/docs/refman/generatormd.py index 6aa0d7873..704ca3b79 100644 --- a/docs/refman/generatormd.py +++ b/docs/refman/generatormd.py @@ -45,6 +45,7 @@ FunctionDictType = T.Dict[ T.Dict[str, T.Dict[str, PlaceholderTypes]], T.Dict[str, T.List[T.Dict[str, PlaceholderTypes]]], T.List[T.Dict[str, PlaceholderTypes]], + T.List[str], ] ] diff --git a/docs/refman/generatorprint.py b/docs/refman/generatorprint.py index d346bc4cf..d836091cd 100644 --- a/docs/refman/generatorprint.py +++ b/docs/refman/generatorprint.py @@ -42,7 +42,6 @@ class GeneratorPrint(GeneratorBase): mlog.log('Pos args: ', mlog.bold(str([x.name for x in func.posargs]))) mlog.log('Opt args: ', mlog.bold(str([x.name for x in func.optargs]))) mlog.log('Varargs: ', mlog.bold(func.varargs.name if func.varargs is not None else 'null')) - mlog.log('Kwargs base:', mlog.bold(func.kwargs_inherit.name if func.kwargs_inherit else 'null')) mlog.log('Kwargs: ', mlog.bold(str(list(func.kwargs.keys())))) def _generate_object(self, obj: Object) -> None: diff --git a/docs/refman/loaderbase.py b/docs/refman/loaderbase.py index 7b6271396..1db92e26a 100644 --- a/docs/refman/loaderbase.py +++ b/docs/refman/loaderbase.py @@ -21,6 +21,7 @@ from .model import ( NamedObject, FetureCheck, ArgBase, + PosArg, DataTypeInfo, Type, Function, @@ -123,7 +124,7 @@ class _Resolver: func.kwargs.update(missing) # Handloe other args inheritance - _T = T.TypeVar('_T', bound=T.Union[ArgBase, T.List[ArgBase]]) + _T = T.TypeVar('_T', bound=T.Union[ArgBase, T.List[PosArg]]) def resolve_inherit(name: str, curr: _T, resolver: T.Callable[[Function], _T]) -> _T: if name and not curr: name = name.strip()