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: retrieve default value for non-string parameters #60

Merged
merged 4 commits into from
Apr 1, 2022

Conversation

Thomzoy
Copy link
Contributor

@Thomzoy Thomzoy commented Mar 21, 2022

Should solve #59 and this issue from mkdocstrings-python

Copy link
Member

@pawamoy pawamoy left a comment

Choose a reason for hiding this comment

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

Thanks a lot!

Could you also add tests for this? You can get inspiration from test_building_annotations_from_nodes in test_nodes.py. Let me know if you need more hints.

We should test simple defaults like strings, integers, floats and booleans, but also more complex expressions like DEFAULT_DICT["key1"], as you showed in #59 🙂

src/griffe/agents/nodes.py Outdated Show resolved Hide resolved
src/griffe/agents/nodes.py Outdated Show resolved Hide resolved
@Thomzoy
Copy link
Contributor Author

Thomzoy commented Apr 1, 2022

Alright I added some tests to the PR ;)

Copy link
Member

@pawamoy pawamoy left a comment

Choose a reason for hiding this comment

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

LGTM (CI good enough, will fix in other commits)!

Thanks again!

@pawamoy pawamoy merged commit 15952ed into mkdocstrings:master Apr 1, 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.

2 participants