Fix URLPattern examples (#2740)

Co-authored-by: Tom Christie <tom@tomchristie.com>
This commit is contained in:
Karen Petrosyan 2023-06-08 16:32:18 +04:00 committed by GitHub
parent b4f66c2cd7
commit 301b8fb03a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -357,12 +357,12 @@ class URLPattern:
A utility class currently used for making lookups against proxy keys...
# Wildcard matching...
>>> pattern = URLPattern("all")
>>> pattern = URLPattern("all://")
>>> pattern.matches(httpx.URL("http://example.com"))
True
# Witch scheme matching...
>>> pattern = URLPattern("https")
>>> pattern = URLPattern("https://")
>>> pattern.matches(httpx.URL("https://example.com"))
True
>>> pattern.matches(httpx.URL("http://example.com"))