-
Notifications
You must be signed in to change notification settings - Fork 526
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
Warnings when building documentation after type stubs changes #2666
Comments
Back in time when the signature extractor was written, there was no such thing as annotations (I.e., the Perl-ification of Python), so there was no provision of extracting the parameter “names” as they are now. the docstrings parsers will have to be modified to account for this. In particular, the CheckSignature method in ParameterList class in the sphinx_generator.py module has to be massaged a bit… |
I have no way to test this since I still can't figure out how to run without My quick guess is add: arg = arg.split(':')[0].strip() here: Phoenix/etgtools/sphinx_generator.py Line 630 in c3092be Although I'm not 100% sure about the difference between arg and myarg here.
Anyway, I'm uncomfortable making a pull request for this myself since I can't test the results myself. |
So based on the docs build log with the mentioned change here: https://github.com/echoix/Phoenix/actions/runs/12729067512/job/35480417371 Looks like this clears up most of the issues, there's a few I saw that can further be fixed, and a few that we can't really do anything about if we want accurate type-stubs:
These are all reserved Python keywords (I saw, About the only way to "fix" these would be adding more special case code in the sphinx generator to trick it by removing the leading I will say - this probably should be addressed at some point (by renaming the C++ names of the variable to non-Python keywords), because attempting to pass values to these as keyword arguments won't work, regardless of what the type-stubs say: wx.FileConfig(is=mystream) # SyntaxError, assuming we somehow got the typestub to be ok with `is` as a name
wx.FileConfig(_is=mystream) # ArgumentError most likely, because the type-stub says `_is` is the name, but SIP is expecting `is`.
This should be fairly straightforward to fix. It's clearly caused by Phoenix/etgtools/tweaker_tools.py Line 158 in c3092be
Probably the best fix is to replace that with a regex that finds
It's clear what's happening here, |
(though testing would definitely be required to make sure that doesn't break something else). I agree that this has not broken my concentration reviewing it for 3+ hours. |
After the type stubs changes, when running
build.py etg
(without --no-doc), the process emits a bunch of warnings like the below:@lojack5 any change you can address this one?
The text was updated successfully, but these errors were encountered: