Skip to content

Conversation

@ponyisi
Copy link
Collaborator

@ponyisi ponyisi commented Nov 1, 2024

Pydantic model classes had completely unhelpful docstrings. This is a design decision by the Pydantic folks, but they provide a workaround (the ability to change the __doc__ attribute via a post-initialization hook - see pydantic/pydantic#638 (comment)). This is implemented. Resolves #303

@codecov
Copy link

codecov bot commented Nov 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.32%. Comparing base (84fc871) to head (1c718eb).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #505      +/-   ##
==========================================
+ Coverage   82.92%   83.32%   +0.40%     
==========================================
  Files          27       27              
  Lines        1540     1577      +37     
==========================================
+ Hits         1277     1314      +37     
  Misses        263      263              
Flag Coverage Δ
unittests 83.32% <100.00%> (+0.40%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@BenGalewsky
Copy link
Contributor

Can you document this Pydantic design decision in the PR?

@gordonwatts - I'm going to wait for you to verify your docstring woes

@ponyisi
Copy link
Collaborator Author

ponyisi commented Nov 5, 2024

Can you document this Pydantic design decision in the PR?
Done - link to github thread added

Copy link
Contributor

@BenGalewsky BenGalewsky left a comment

Choose a reason for hiding this comment

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

Ok, seems messy but solves the problem

@BenGalewsky BenGalewsky merged commit 6356444 into master Nov 14, 2024
42 checks passed
@BenGalewsky BenGalewsky deleted the 303_model_help branch November 14, 2024 14:14
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.

TransformResults does not do well when you use the help in python

3 participants