python-jsonschema / python-jsonschema/jsonschema-lexer
Remove extra list copying
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1
- Forks
- 1
- Avg merge
- 9h 47m
- Merged PRs (30d)
- 2
Description
(Filing this mostly as a reminder after taking a quick look at the code)
A bunch of places materialize Python lists of tokens unnecessarily (by calling list() on some iterable).
This isn't a huge deal as we likely will never really need to deal with giant schemas, but it's unnecessary.
We should instead only do this if/when we ever need to (e.g. to maintain state for our additional parsing).
Contributor guide
No contributing guide indexed for this repository
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
The issue names no files or tests. Start by locating the places where token iterables are wrapped in list() and determine which materializations are unnecessary; done means those lists are no longer created unless needed for parser state, without changing lexer behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100