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

Url strictness #324

Merged
merged 4 commits into from
Nov 4, 2022
Merged

Url strictness #324

merged 4 commits into from
Nov 4, 2022

Conversation

samuelcolvin
Copy link
Member

@samuelcolvin samuelcolvin commented Nov 3, 2022

Continuation from #317.

turns out I was a bit hasty when merging URLs.

We need to support multiple hosts, but while thinking about that, I realised we should use SyntaxViolations in strict mode.

Still to do on this PR:

  • add a passed_strict flag to Url and check it during validation in strict mode
  • new UrlType error if Url type checks fail

@codecov-commenter
Copy link

Codecov Report

Merging #324 (3229430) into main (34c52d3) will decrease coverage by 0.00%.
The diff coverage is 92.59%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #324      +/-   ##
==========================================
- Coverage   97.29%   97.28%   -0.01%     
==========================================
  Files          57       57              
  Lines        6540     6561      +21     
  Branches       45       45              
==========================================
+ Hits         6363     6383      +20     
- Misses        177      178       +1     
Impacted Files Coverage Δ
pydantic_core/core_schema.py 100.00% <ø> (ø)
src/errors/types.rs 77.63% <66.66%> (-0.15%) ⬇️
src/url.rs 98.94% <100.00%> (ø)
src/validators/url.rs 96.80% <100.00%> (+0.75%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 34c52d3...3229430. Read the comment docs.

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.

None yet

2 participants