Skip to content
This repository was archived by the owner on Nov 11, 2024. It is now read-only.
This repository was archived by the owner on Nov 11, 2024. It is now read-only.

smart_resolver isn't working for descriptor classes #28

Closed

Description

@astrofrog

For classes such as ConfigItem, which use the InheritDocstrings meta-class, the following code in smart_resolver doesn't work:

    if what in ('class', 'exception'):

because what ends up being attribute for those classes. I haven't figured out why yet, but it seems to be to do with the fact that type(ConfigItem) is not type.

Activity

  1. astrofrog commented on Jun 1, 2014

    @astrofrog
    MemberAuthor

    @mdboom - any ideas how to get around this issue?

  2. mdboom commented on Jun 1, 2014

    @mdboom
    Contributor

    Can you provide an example of a link that fails?

  3. astrofrog commented on Jun 2, 2014

    @astrofrog
    MemberAuthor

    The easiest way to see the warning I've been seeing is to check out the branch from astropy/astropy#2508, and remove the three astropy.config classes from the docs/nitpick-exceptions file, then run python setup.py build_sphinx.

  4. mdboom commented on Jun 2, 2014

    @mdboom
    Contributor

    The InheritDocstrings is a red herring, and indeed this works for other classes with InheritDocstrings. What this doesn't work for is for descriptor classes, which Sphinx considers to be something different than regular classes. Fix is attached (and @astrofrog: would you mind editing the title of this issue so we can find it later?)

  5. changed the title [-]smart_resolver isn't working for classes that use InheritDocstrings[/-] [+]smart_resolver isn't working for descriptor classes[/+] on Jun 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions