Mark accessors/return values that can be None with Optional[]

* This helps with type checkers to know that things can be None or not (both to
  silence previous warnings about "unnecessary" checks that are actually
  necessary, and to ensure those checks aren't omitted by accident)
This commit is contained in:
baldurk
2026-09-11 15:04:03 +01:00
parent ce50614f0e
commit 83c53890da
12 changed files with 113 additions and 74 deletions
+1 -1
View File
@@ -106,7 +106,7 @@ def prepare_history():
refl = pipe.GetShaderReflection(renderdoc.ShaderStage.Pixel)
if not refl.debugInfo.debuggable:
if refl is None or not refl.debugInfo.debuggable:
print("Shader can't be debugged:")
print(refl.debugInfo.debugStatus)
return