Skip to content

Commit b086352

Browse files
committed
bunch of minor doctest fixups
1 parent 6682bd9 commit b086352

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/hyperlink/_url.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1782,8 +1782,9 @@ class DecodedURL(object):
17821782
not URL components, like :class:`URL`. To programmatically
17831783
construct a :class:`DecodedURL`, you can use this pattern:
17841784
1785-
>>> DecodedURL().replace(host='pypi.org', path=('projects', 'hyperlink').to_text()
1786-
"http://pypi.org/projects/hyperlink"
1785+
>>> print(DecodedURL().replace(scheme=u'https',
1786+
... host=u'pypi.org', path=(u'projects', u'hyperlink')).to_text())
1787+
https://pypi.org/projects/hyperlink
17871788
17881789
*(New in 18.0.0)*
17891790
"""
@@ -2116,9 +2117,9 @@ def parse(url, decoded=True, lazy=False):
21162117
"""
21172118
Automatically turn text into a structured URL object.
21182119
2119-
>>> url = parse("https://github.com/python-hyper/hyperlink")
2120+
>>> url = parse(u"https://github.com/python-hyper/hyperlink")
21202121
>>> print(url.to_text())
2121-
"https://github.com/python-hyper/hyperlink"
2122+
https://github.com/python-hyper/hyperlink
21222123
21232124
Args:
21242125
url (str): A text string representation of a URL.

0 commit comments

Comments
 (0)