Skip to content

Commit 35bc72c

Browse files
committed
Fix the lint warnings and CI Errors.
1 parent 40444c2 commit 35bc72c

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

Doc/library/urllib.robotparser.rst

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,15 @@ structure of :file:`robots.txt` files, see :rfc:`9309`.
2424
.. class:: RobotFileParser(url_or_request='')
2525

2626
This class provides methods to read, parse and answer questions about the
27-
:file:`robots.txt` file at *url* or a :class:`Request` object with additional
28-
user-agent headers populated.
27+
:file:`robots.txt` file at *url* or a :class:`urllib.request.Request` object
28+
with additional user-agent headers populated.
2929

3030

3131
.. method:: set_url(url_or_request)
3232

33-
Sets the URL referring to a :file:`robots.txt` file or a :class:`Request`
34-
object with additional user-agent headers populated.
33+
Sets the URL referring to a :file:`robots.txt` file or a
34+
:class:`urllib.request.Request` object with additional user-agent headers
35+
populated.
3536

3637
.. method:: read()
3738

@@ -107,7 +108,8 @@ class::
107108
False
108109

109110

110-
The following example demonstrates use of a :class:`Request` object with additional user-agent headers populated::
111+
The following example demonstrates use of a :class:`urllib.request.Request`
112+
object with additional user-agent headers populated::
111113

112114
>>> import urllib.robotparser
113115
>>> import urllib.request
@@ -117,4 +119,4 @@ The following example demonstrates use of a :class:`Request` object with additio
117119
>>> rp.can_fetch("*", "https://en.wikipedia.org/")
118120
True
119121
>>> rp.can_fetch("*", "https://en.wikipedia.org/trap/")
120-
False
122+
False

Lib/urllib/robotparser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def modified(self):
5555
self.last_checked = time.time()
5656

5757
def set_url(self, url_or_request):
58-
"""Sets the URL referring to a robots.txt file.
58+
"""Sets the URL referring to a robots.txt file.
5959
url_or_request can be a string or a Request object.
6060
"""
6161
self.url = url_or_request

0 commit comments

Comments
 (0)