litestar-org / litestar-org/polyfactory
Bug: Typo in `field_meta.py` ?
Open
Nobody has claimed this yet.
bug
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 120
- PR merge metrics
- No merged PRs in 30d
Description
Description
By analogy, I assume the line:
"max_length": getattr(value, "max_length", getattr(value, "max_length", None)),
should be:
"max_length": getattr(value, "max_length", getattr(value, "max_items", None)),
(if it is not a typo, the second getattr is redundant and could be removed)
URL to code causing the issue
MCVE
No response
Steps to reproduce
No response
Screenshots
No response
Logs
No response
Release Version
2.12.0
Platform
- Linux
- Mac
- Windows
- Other (Please specify in the description above)
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 reading polyfactory/field_meta.py at the referenced line and inspect how max_length and max_items are used in the surrounding metadata handling. Verify whether the repeated max_length lookup is intentional, then make the smallest correction if needed and confirm the relevant project tests still pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100