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

Fix BufferID.placeholder static property, Doxygen docs #1184

Merged

Conversation

parker-research
Copy link
Contributor

During the M.CSS documentation generation setup, it errored when it got to the following:

        .def_property_readonly_static("placeholder", &BufferID::getPlaceholder)

The issue is that the static function is actually treated as a @classmethod in Python, and the associated C++ function is called with the cls = type(self) argument. In the fix, an anonymous function is used to discard the cls in the call.

Also added a note about Doxygen.in which I wish was present from the start.

@parker-research
Copy link
Contributor Author

This bug is also mentioned in MikePopoloski/pyslang#96 - it caused a roadblock when someone struggled to generate type stubs.

Copy link

codecov bot commented Dec 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.67%. Comparing base (0d48fb9) to head (e5e41aa).
Report is 3 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1184   +/-   ##
=======================================
  Coverage   94.67%   94.67%           
=======================================
  Files         201      201           
  Lines       50552    50552           
=======================================
  Hits        47859    47859           
  Misses       2693     2693           

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0d48fb9...e5e41aa. Read the comment docs.

@MikePopoloski MikePopoloski merged commit f384536 into MikePopoloski:master Dec 3, 2024
15 checks passed
@parker-research parker-research deleted the python-doc-gen-bare-fixes branch December 3, 2024 22:12
@Esser50K
Copy link

So pparently been fixed? how can I generate things now?

I tried using the nightly build but the issue mentioned on MikePopoloski/pyslang#96 is still present

@parker-research
Copy link
Contributor Author

Just confirmed that as of pyslang commit a864e10 (which bumped the submodule version), both of the following work:

pip install mypy
stubgen -p pyslang

pip install pybind11-stubgen
pybind11-stubgen pyslang
# Note: Lots of error log messages. Generation still succeeds though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants