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

Add support for paramspec #255

Merged
merged 6 commits into from Sep 20, 2022
Merged

Add support for paramspec #255

merged 6 commits into from Sep 20, 2022

Conversation

Numerlor
Copy link
Contributor

Adds support for ParamSpec, to keep compat I've decided to only check the name as typing_extensions is not a normal dep, and someone else using the name seems unlikely, though a check for some attribute could be added if necessary

Copy link
Member

@gaborbernat gaborbernat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add test, changelog entry.

the type accesses have to use the type builtin
to get the correct type in case __class__ is patched
Copy link
Member

@gaborbernat gaborbernat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of the checks still fail.

@Numerlor
Copy link
Contributor Author

Numerlor commented Sep 19, 2022

Not sure about the 3.7 check, as it's failing for me on main too, and type is something from stubs?

@gaborbernat
Copy link
Member

Not sure about the 3.7 check, as it's failing for me on main too, and type is something from stubs?

Indeed something changed between https://github.com/tox-dev/sphinx-autodoc-typehints/actions/runs/3043415433 and https://github.com/tox-dev/sphinx-autodoc-typehints/actions/runs/3051184692.

The type check failure is because of because of github.com/python/mypy/pull/13500 (see related github.com/python/mypy/issues/13627); waiting for mypy 0.980 release to fix that. I don't have currently the bandwith to look into this, so if you want this to land soon would be much apprecated if you can look into it and put in a fix PR.

@Numerlor
Copy link
Contributor Author

Okay, for 3.7, it looks like the type_comment extra is not getting installed and type comments are skipped because of that.
The trailing ``s used here

type_comments
was dropped in ccc75d2, but after removing it in tox.ini, it still is unable to find it unless the underscore is removed or changed to -, not sure if that's a bug somewhere or the intended behaviour.

Should I just change it to -?

@gaborbernat
Copy link
Member

Should I just change it to -?

Can give it a try to see if helps.

the underscore caused pip to miss it, and tests to fail
@gaborbernat gaborbernat merged commit d8a9b9c into tox-dev:main Sep 20, 2022
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.

None yet

2 participants