-
Notifications
You must be signed in to change notification settings - Fork 247
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
adding docstrings #795
adding docstrings #795
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #795 +/- ##
==========================================
- Coverage 93.52% 93.48% -0.04%
==========================================
Files 100 102 +2
Lines 14379 14606 +227
Branches 25 25
==========================================
+ Hits 13448 13655 +207
- Misses 925 945 +20
Partials 6 6
... and 11 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
CodSpeed Performance ReportMerging #795 will not alter performanceComparing Summary
Benchmarks breakdown
|
include: A set of fields to include, if `None` all fields are included. | ||
exclude: A set of fields to exclude, if `None` no fields are excluded. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
__match_args__ = ('value',) | ||
|
||
@property | ||
def value(self) -> _T: ... | ||
def value(self) -> _T: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def __new__(cls, schema: CoreSchema, config: CoreConfig | None = None) -> Self: | ||
""" | ||
Create a new SchemaValidator. | ||
|
||
Arguments: | ||
schema: The [`CoreSchema`][pydantic_core.core_schema.CoreSchema] to use for validation. | ||
config: Optionally a [`CoreConfig`][pydantic_core.core_schema.CoreConfig] to configure validation. | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like __new__
doesn't show in the docs. @Kludex also reported an issue with __new__
and __init__
mismatching arguments in some cases (e.g. for exceptions, __init__
comes from BaseException
). I think this is probably a PyO3 bug, PyO3 sets __new__
but not __init__
.
Maybe for now it's more practical to set both __new__
and __init__
here, document __init__
, and I'll have a think about how to resolve this in PyO3?
going to merge this in the hope of including it in the next release, I'll fix those things in a new PR. |
WIP