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

PrivateAttr is passed from Annotated default position #8004

Merged
merged 9 commits into from Nov 3, 2023

Commits on Nov 3, 2023

  1. PrivateAttr is passed from Annotated default position

    Co-authored-by: Samuel Colvin <s@muelcolvin.com>
    
    <!-- Thank you for your contribution! -->
    <!-- Unless your change is trivial, please create an issue to discuss the change before creating a PR -->
    
    ## Change Summary
    See related issue for a minimal example.
    
    - When creating private fields from typing.Annotated, the default method gets thrown out in the current implementation.
    - This Pull-Requests adds functionality to check wether the Default in the `Anntotated[]` definition already is a `PrivateAttr` and uses it straight away.
    
    ## Related issue number
    
    fix pydantic#7955
    
    ## 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**
    Tim Kreitner committed Nov 3, 2023
    Configuration menu
    Copy the full SHA
    175901c View commit details
    Browse the repository at this point in the history
  2. more specific checking for annotated type

    Tim Kreitner committed Nov 3, 2023
    Configuration menu
    Copy the full SHA
    ee91d87 View commit details
    Browse the repository at this point in the history
  3. addressing comments

    Tim Kreitner committed Nov 3, 2023
    Configuration menu
    Copy the full SHA
    0214ac2 View commit details
    Browse the repository at this point in the history
  4. fix test

    Tim Kreitner committed Nov 3, 2023
    Configuration menu
    Copy the full SHA
    1b6e2f6 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    0431d02 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    fca864f View commit details
    Browse the repository at this point in the history
  7. Merge remote-tracking branch 'upstream/fix-ruff-migration-issues' int…

    …o 7955-fix-attr-error
    Tim Kreitner committed Nov 3, 2023
    Configuration menu
    Copy the full SHA
    e50f9a7 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    7074a48 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    ff9c789 View commit details
    Browse the repository at this point in the history