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: get_object dynamic supports methods set by assignments #305

Merged
merged 1 commit into from
Nov 20, 2023

Conversation

machow
Copy link
Owner

@machow machow commented Nov 20, 2023

This PR allows for dynamically documenting methods defined like...

from some_module import some_func

class SomeClass:
    some_method = some_func

I refactored the approach we use to look for the canonical path to an object. Previously, it wasn't always finding where the dynamic objects lived, and so resulted in returning something closer to the static result. This means that in the above case it believed some_method was an attribute.

I moved the logic for looking for where an object lives into _canonical_path, so hopefully it is easier to add and test new cases.

@machow machow merged commit 3881be4 into main Nov 20, 2023
6 checks passed
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.

1 participant