-
Notifications
You must be signed in to change notification settings - Fork 20
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
Dynamic import broken for class and module attributes #307
Comments
Shoot, thanks for the example--I'm working on this now, and will add these to the test suite... |
From testing with quarto v0.6.6, things seem like this:
class AwesomeClass:
"""
This is an awesome class
"""
# REGRESSION: couldn't dynamically import a or b ----
a: int
b: dict
"""b is great"""
# UNCHANGED BEHAVIOR: docstring for `1` or `{}` being used ----
# quartodoc can't tell whether you mean to use the dynamically imported
# objects docstring or not (e.g. if it were a function instead of `1`, people
# often want to use the function's docstring).
#
# For cases like d, we could also try to *statically* load the docstring ("d is great"),
# and if that works, then use that one?
c: int = 1
d: dict = {}
"""d is great""" (I tested pretty quickly, so might have messed something up, but am digging it more!) |
I've added a fix and tests for the regression in #309 -- do you mind checking to see if it works for you?! |
Should be resolved by #309 , definitely let me know if you run into issues -- happy to relook |
With
dynamic=True
This is a regression introduced in cd7fd5a.
Here is how to reproduce it.
The output should be the same when
dynamic=False
The text was updated successfully, but these errors were encountered: