mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 09:00:44 +00:00
Improve cross-module references in docstrings
This commit is contained in:
@@ -234,7 +234,8 @@ def check_used_types(objname, module, used_types):
|
||||
print(" - Maybe missing namespace to refer to renderdoc.{}?".format(type_name))
|
||||
break
|
||||
|
||||
for mod_name in ['renderdoc', 'qrenderdoc']:
|
||||
check_mods = ['renderdoc', 'qrenderdoc']
|
||||
for mod_name in check_mods:
|
||||
mod = sys.modules[mod_name]
|
||||
if args.verbose:
|
||||
print("===== Checks for {} =====".format(mod_name))
|
||||
@@ -350,7 +351,15 @@ for mod_name in ['renderdoc', 'qrenderdoc']:
|
||||
type_name = re.sub('StructuredObjectList', 'List[SDObject]', type_name)
|
||||
type_name = re.sub('StructuredChunkList', 'List[SDChunk]', type_name)
|
||||
type_name = re.sub('^builtins.', '', type_name)
|
||||
type_name = re.sub('^importlib._bootstrap.', '', type_name)
|
||||
|
||||
if 'importlib._bootstrap' in type_name:
|
||||
type_name = re.sub('^importlib._bootstrap.', '', type_name)
|
||||
real_module = [
|
||||
m for m in check_mods if type_name in sys.modules[m].__dict__
|
||||
][0]
|
||||
if real_module != mod_name:
|
||||
type_name = f"{real_module}.{type_name}"
|
||||
|
||||
type_name = re.sub('datetime.datetime', 'datetime', type_name)
|
||||
|
||||
if type_name == 'NoneType':
|
||||
|
||||
@@ -82,7 +82,7 @@ struct ShaderProcessingTool
|
||||
}
|
||||
DOCUMENT(R"(The :class:`KnownShaderTool` identifying which known tool this program is.
|
||||
|
||||
:type: KnownShaderTool
|
||||
:type: renderdoc.KnownShaderTool
|
||||
)");
|
||||
KnownShaderTool tool = KnownShaderTool::Unknown;
|
||||
DOCUMENT(R"(The human-readable name of the program.
|
||||
@@ -102,12 +102,12 @@ struct ShaderProcessingTool
|
||||
rdcstr args;
|
||||
DOCUMENT(R"(The input that this program expects.
|
||||
|
||||
:type: ShaderEncoding
|
||||
:type: renderdoc.ShaderEncoding
|
||||
)");
|
||||
ShaderEncoding input = ShaderEncoding::Unknown;
|
||||
DOCUMENT(R"(The output that this program provides.
|
||||
|
||||
:type: ShaderEncoding
|
||||
:type: renderdoc.ShaderEncoding
|
||||
)");
|
||||
ShaderEncoding output = ShaderEncoding::Unknown;
|
||||
|
||||
|
||||
@@ -2202,7 +2202,7 @@ tool.
|
||||
|
||||
:param KnownShaderTool tool: The tool to get the input encoding for.
|
||||
:return: The encoding that this tool expects as an input by default.
|
||||
:rtype: renderdoc.ShaderEncoding
|
||||
:rtype: ShaderEncoding
|
||||
)");
|
||||
constexpr inline ShaderEncoding ToolInput(KnownShaderTool tool)
|
||||
{
|
||||
@@ -2229,7 +2229,7 @@ tool.
|
||||
|
||||
:param KnownShaderTool tool: The tool to get the output encoding for.
|
||||
:return: The encoding that this tool produces as an output by default.
|
||||
:rtype: renderdoc.ShaderEncoding
|
||||
:rtype: ShaderEncoding
|
||||
)");
|
||||
constexpr inline ShaderEncoding ToolOutput(KnownShaderTool tool)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user