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

Enhance AND pattern evaluation to fail fast #185

Merged
merged 3 commits into from Nov 11, 2021
Merged

Conversation

lundberg
Copy link
Owner

@lundberg lundberg commented Nov 9, 2021

This PR enhances the evaluation of the AND pattern to fail fast, i.e. fail match early when left-hand pattern is "falsey".

Thanks @dariobauer for pointing this out in #182.

@codecov-commenter
Copy link

codecov-commenter commented Nov 9, 2021

Codecov Report

Merging #185 (9d4c1f8) into master (96f4457) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##            master      #185    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           20        20            
  Lines         2714      2712     -2     
  Branches       157       289   +132     
==========================================
- Hits          2714      2712     -2     
Impacted Files Coverage Δ
respx/patterns.py 100.00% <100.00%> (ø)

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 96f4457...9d4c1f8. Read the comment docs.

@Mojken
Copy link

Mojken commented Nov 11, 2021

How come this hasn't been merged yet? Merging this should close #182. If for whatever reason you want to wait with merging this, consider closing the issue, or otherwise marking it as handled.

@lundberg
Copy link
Owner Author

Merging this should close #182.

Nope, #182 will be fixed by merging #184.

This PR is merely a side effect of discussions in #182.

@Mojken
Copy link

Mojken commented Nov 11, 2021

Ah, my bad. Either way, this looks ready to be merged, and my comment still applies to #184 instead.

@lundberg lundberg merged commit 8511566 into master Nov 11, 2021
@lundberg lundberg deleted the enhance-and-pattern branch November 11, 2021 14:31
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

3 participants