Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] py docstrings: better conversion of C++ types to python #2581

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[docs] py docstrings - don't rely on sorted or reversable py dicts (f…
…or py < 3.6)
  • Loading branch information
pmolodo committed Oct 17, 2023
commit e44fe6b7f58b2c5f0bac7249596dd5df7f49704d
6 changes: 3 additions & 3 deletions docs/python/doxygenlib/cdWriterDocstring.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,14 @@ def getAllPxrModules() -> Dict[str, types.ModuleType]:
pxrModuleName = basename
if pxrModuleName:
modules[pxrModuleName] = importPxrModule(pxrModuleName)
# return a sorted dict
return {k: modules[k] for k in sorted(modules)}
return modules

pxrModules = getAllPxrModules()
pxrModuleNames = sorted(pxrModules)

# we use the reversed sorted order of the module names, because this ensures that longer names (ie, UsdGeom) come
# before shorter ones (Usd), so the more exact matches are preferred
PXR_MODULES_OR_JOINED = "|".join(re.escape(m) for m in reversed(pxrModules))
PXR_MODULES_OR_JOINED = "|".join(re.escape(m) for m in reversed(pxrModuleNames))
PXR_MODULE_PREFIX = re.compile(rf"^\s*(?P<module>{PXR_MODULES_OR_JOINED})(?P<suffix>[A-Za-z0-9_]+)")


Expand Down
Loading