litestar-org / litestar-org/polyfactory
Enhancement: switch to type-lens
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 120
- PR merge metrics
- No merged PRs in 30d
Description
### Summary
We have a lot of utility functions to help us figure out the various types from models and extract information from them. A lot of this is now included in [type-lens](https://github.com/litestar-org/type-lens), so we should be switching to using that instead.
cc: @peterschutt
### Basic Example
_No response_
### Drawbacks and Impact
I'm not sure if there's an easy way to do this without making breaking changes. There may be, but I am inclined to make the breaking changes regadlless. I don't *think* it would effect users too much since most likely it would only change things like `FieldModel` and some other stuff that polyfactory which, while technically public API, are probably not used by many users.
### Unresolved questions
_No response_
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the utility functions that inspect model types and the FieldModel code mentioned in the issue, then compare their responsibilities with type-lens. Determine the migration scope and any public API or breaking-change implications. Done means the relevant type handling uses type-lens consistently and the affected behavior remains covered by the project's existing checks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100