Skip to content
Myr

Fix URLPattern examples (#2740)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Karen Petrosyan · committed by GitHub · parent b4f66c2 · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Co-authored-by: Tom Christie <tom@tomchristie.com>

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:httpx/_utils.py+2 added-2 removed
355 unmodified lines
356 """357 A utility class currently used for making lookups against proxy keys...358359 # Wildcard matching...360 >>> pattern = URLPattern("all")360 >>> pattern = URLPattern("all://")361 >>> pattern.matches(httpx.URL("http://example.com"))362 True363364 # Witch scheme matching...365 >>> pattern = URLPattern("https")365 >>> pattern = URLPattern("https://")366 >>> pattern.matches(httpx.URL("https://example.com"))367 True368 >>> pattern.matches(httpx.URL("http://example.com"))369 False
108 unmodified lines