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 failure to use autoclass on non-traitlets configurable classes #10

Merged
merged 1 commit into from
Dec 6, 2022

Conversation

blink1073
Copy link
Contributor

Seen while working on jupyter/nbclient#230:

reading sources... [100%] reference/nbclient.tests
Exception occurred:
  File "/Users/silvester/miniconda/envs/nbclient_env/lib/python3.10/site-packages/autodoc_traits/autodoc_traits.py", line 20, in get_object_members
    else self.object.class_traits
AttributeError: type object 'NBClientTestsBase' has no attribute 'class_traits'

@welcome

This comment was marked as resolved.

@consideRatio consideRatio added the bug Something isn't working label Dec 6, 2022
@consideRatio consideRatio changed the title Filter objects by type Fix failure to use autoclass on non-traitlets configurable classes Dec 6, 2022
@consideRatio consideRatio merged commit 0b679fe into jupyterhub:main Dec 6, 2022
@welcome
Copy link

welcome bot commented Dec 6, 2022

Congrats on your first merged pull request in this project! 🎉
congrats
Thank you for contributing, we are very proud of you! ❤️

@consideRatio
Copy link
Member

Thanks @blink1073, makes sense to me!

I understand it as the bug will show up if you use the autoclass directive (or the automodule directive) on classes that isn't coupled to traitlets in any way.

@blink1073 blink1073 deleted the allow-metahastraits branch December 6, 2022 02:53
@blink1073
Copy link
Contributor Author

Yes, using automodule with a mix of traitlets and non-traitlets classes triggered the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants