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

Replace str type annotation with Any in validator factories in documentation on validators #9885

Merged
merged 1 commit into from
Jul 18, 2024

Conversation

maximilianfellhuber
Copy link
Contributor

@maximilianfellhuber maximilianfellhuber commented Jul 11, 2024

Change Summary

The (wrap) validator functions in the validators section of the documentation have a return type indicating that the validator takes a string as input and returns a string when this is actually not known. Also this way the types of the factory and the inner function do not match.
This is a very minor issue but had me confused when reading it.

Related issue number

None

Checklist

  • The pull request title is a good summary of the changes - it will be used in the changelog
  • Unit tests for the changes exist
  • Tests pass on CI
  • Documentation reflects the changes where applicable
  • My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

Selected Reviewer: @sydney-runkle

@maximilianfellhuber
Copy link
Contributor Author

please review

Copy link

codspeed-hq bot commented Jul 11, 2024

CodSpeed Performance Report

Merging #9885 will not alter performance

Comparing maximilianfellhuber:docs/typing-error (544391e) with main (d654a07)

Summary

✅ 13 untouched benchmarks

Copy link
Member

@sydney-runkle sydney-runkle left a comment

Choose a reason for hiding this comment

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

Great, awesome catch!

@sydney-runkle sydney-runkle added relnotes-fix Used for bugfixes. and removed documentation labels Jul 18, 2024
@sydney-runkle sydney-runkle merged commit 2315e45 into pydantic:main Jul 18, 2024
61 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants