mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-24 14:45:53 +00:00
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:
@@ -117,7 +117,7 @@ Picking the first of these, we can then :ref:`move to that event <currentevent>`
|
||||
.. highlight:: python
|
||||
.. code:: python
|
||||
|
||||
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
|
||||
@@ -342,4 +342,4 @@ This example can be found under the name "Pixel History & Shader Debug" in the p
|
||||
|
||||
:download:`Download the example script <history_debug.py>`.
|
||||
|
||||
.. literalinclude:: history_debug.py
|
||||
.. literalinclude:: history_debug.py
|
||||
|
||||
Reference in New Issue
Block a user