Commit Graph
19 Commits
Author SHA1 Message Date
baldurk 83c53890da 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)
2026-09-11 15:04:03 +01:00
baldurk f97094fb23 Don't include swig static member function wrappers in stubs 2026-08-13 21:05:14 +01:00
baldurk 7a1233e17e Fix some python warnings in docs config & docstring checker 2026-08-13 17:46:48 +01:00
baldurk 5e462c5ebe Add type hints to python for class constructors
* We enforce default and copy constructors where possible, this isn't very
  pythonic but we can't use copy.deepcopy on our types.
* The structs that have specialised constructors e.g. FloatVector or Subresource
  also have those documented though we have no way to enforce it.
2026-08-13 17:46:47 +01:00
baldurk 40945e6e8a Explicitly note that MiniQtHelper callbacks are optional 2026-08-13 17:46:47 +01:00
baldurk 3f653cfbf2 Remove RENDERDOC_GetDefaultCaptureOptions, initialise in constructor 2026-08-13 17:46:46 +01:00
baldurk 87825d3d64 Handle and check for default values in docstrings for verify-docstrings 2026-08-13 17:46:45 +01:00
baldurk c15a5c2c66 Add os.add_dll_directory cruft to verify-docstrings 2026-08-13 17:46:39 +01:00
baldurk 1730e6b5af For callable docstrings allow either std::function or Callback typedef 2026-03-13 13:07:44 +00:00
baldurk 109e524d5c Improve cross-module references in docstrings 2026-03-13 13:07:44 +00:00
baldurk a1473c5f84 Improve docstring checking when a class can't be instantiated
* Also print warnings for the classes that aren't being checked
2026-02-09 18:05:35 +00:00
baldurk 5957a2710b Enforce that all docstrings of members have a :type: 2025-09-09 18:57:35 +01:00
baldurk b4615dbd18 Add a delayed callback helper for python 2025-09-09 18:57:34 +01:00
baldurk 1c7a4c24dd Unwrap staticmethod if necessary when checking python docstrings
* Happens on github CI for some reason.
2025-02-11 00:21:39 +00:00
baldurk 91c935ffde Fix verify-docstrings to handle rdcfixedarray tuples
* Removes a couple of exceptions from functions it can't verify.
2024-11-18 11:31:12 +00:00
baldurk 16b82d1689 Handle rdcstrpair or rdcstrpairs in function return types for docstrings 2021-05-17 15:05:13 +01:00
baldurk e7e2b73170 Search extracted namespace for class, not all headers 2020-12-16 20:39:58 +00:00
baldurk 659fdaa235 Check that all complex struct members that have :type: in docstrings
* Ideally we'd document every member unconditionally for best autocompletion,
  but that's a lot of modification so for now we stick to just making sure that
  any members that are struct types (or lists/tuples) have the :type:
  declaration so that we can autocomplete inside them.
2020-12-09 15:18:27 +00:00
baldurk 6b8ce92d88 Clean up docstrings in python interfaces to be strictly typed/formatted
* Also added a script that can run as part of CI to verify that the docstring
  matches, by generating a regex from the docstring documented parameter types
  and return type and making sure we find a match within the C headers. This
  ensures all parameters are documented with the right types, no extra
  parameters are documented, and the return type is correct.
* The script also checks proper scoping so that if qrenderdoc docstrings
  mention a renderdoc type, they need to scope it properly.
2020-12-07 17:44:51 +00:00