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

begin refactoring ValLineError collection #1517

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

davidhewitt
Copy link
Contributor

Change Summary

Motivated by #1512.

Our error handling code is getting complicated at each callsite. This begins an attempt to refactor it to move repetition into common code, by adding a .collect_line_errors() helper to take LineErrors and collect them up.

This only touches a few of the many code paths which collect line errors; they have a variety of different ways to build up locations. If we think we want to proceed with this, I'll follow up with further refactorings another day.

Related issue number

N/A

Checklist

  • Unit tests for the changes exist
  • Documentation reflects the changes where applicable
  • Pydantic tests pass with this pydantic-core (except for expected changes)
  • My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

@davidhewitt davidhewitt mentioned this pull request Nov 1, 2024
Copy link

codspeed-hq bot commented Nov 1, 2024

CodSpeed Performance Report

Merging #1517 will not alter performance

Comparing dh/collect-line-errors (3e5f948) with main (89bdee1)

Summary

✅ 155 untouched benchmarks

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

Successfully merging this pull request may close these issues.

1 participant