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

feat: add recursion guard (Sourcery refactored) #469

Closed
wants to merge 14 commits into from

Conversation

sourcery-ai[bot]
Copy link

@sourcery-ai sourcery-ai bot commented Jan 2, 2024

Pull Request #468 refactored by Sourcery.

Since the original Pull Request was opened as a fork in a contributor's
repository, we are unable to create a Pull Request branching from it.

To incorporate these changes, you can either:

  1. Merge this Pull Request instead of the original, or

  2. Ask your contributor to locally incorporate these commits and push them to
    the original Pull Request

    Incorporate changes via command line
    git fetch https://github.com/litestar-org/polyfactory pull/468/head
    git merge --ff-only FETCH_HEAD
    git push

NOTE: As code is pushed to the original Pull Request, Sourcery will
re-run and update (force-push) this Pull Request with new refactorings as
necessary. If Sourcery finds no refactorings at any point, this Pull Request
will be closed automatically.

See our documentation here.

Run Sourcery locally

Reduce the feedback loop during development by using the Sourcery editor plugin:

Help us improve this pull request!

@sourcery-ai sourcery-ai bot requested review from a team as code owners January 2, 2024 11:03
@sourcery-ai sourcery-ai bot force-pushed the sourcery/pull-468 branch from 5ea3f16 to 4389835 Compare January 2, 2024 11:09
@sourcery-ai sourcery-ai bot force-pushed the sourcery/pull-468 branch from 4389835 to 5959001 Compare January 2, 2024 11:14
@sourcery-ai sourcery-ai bot force-pushed the sourcery/pull-468 branch from 5959001 to 9462d28 Compare January 2, 2024 11:16
@sourcery-ai sourcery-ai bot force-pushed the sourcery/pull-468 branch 2 times, most recently from 20c27a1 to 3a8f6c0 Compare January 3, 2024 14:01
@sourcery-ai sourcery-ai bot force-pushed the sourcery/pull-468 branch 2 times, most recently from a723275 to bf885e5 Compare January 3, 2024 14:47
@sourcery-ai sourcery-ai bot force-pushed the sourcery/pull-468 branch from bf885e5 to 7dd25a9 Compare January 3, 2024 14:49
@sourcery-ai sourcery-ai bot force-pushed the sourcery/pull-468 branch from 7dd25a9 to f0704d0 Compare January 4, 2024 18:23
@sourcery-ai sourcery-ai bot force-pushed the sourcery/pull-468 branch from f0704d0 to 84fdf9f Compare January 9, 2024 17:14
@sourcery-ai sourcery-ai bot force-pushed the sourcery/pull-468 branch from 84fdf9f to ec53212 Compare January 13, 2024 15:25
@sourcery-ai sourcery-ai bot force-pushed the sourcery/pull-468 branch 2 times, most recently from 255146c to d142385 Compare January 15, 2024 11:24
@sourcery-ai sourcery-ai bot force-pushed the sourcery/pull-468 branch from d142385 to a383e26 Compare January 15, 2024 11:32
@sourcery-ai sourcery-ai bot force-pushed the sourcery/pull-468 branch from a383e26 to b6988bd Compare January 16, 2024 07:05

return generic_args[0]
return None if len(generic_args) != 1 else generic_args[0]
Copy link
Author

Choose a reason for hiding this comment

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

Function BaseFactory._infer_model_type refactored with the following changes:

Copy link

@guacs guacs closed this Jan 16, 2024
Copy link

Documentation preview will be available shortly at https://litestar-org.github.io/polyfactory-docs-preview/469

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants