Skip to content

Commit a09295d

Browse files
committed
Issues #29189: Merge indentation fixes from 3.6
2 parents d4ba4c2 + ea52f56 commit a09295d

File tree

2 files changed

+50
-50
lines changed

2 files changed

+50
-50
lines changed

Doc/library/json.rst

+11-11
Original file line numberDiff line numberDiff line change
@@ -505,27 +505,27 @@ Exceptions
505505

506506
.. exception:: JSONDecodeError(msg, doc, pos, end=None)
507507

508-
Subclass of :exc:`ValueError` with the following additional attributes:
508+
Subclass of :exc:`ValueError` with the following additional attributes:
509509

510-
.. attribute:: msg
510+
.. attribute:: msg
511511

512-
The unformatted error message.
512+
The unformatted error message.
513513

514-
.. attribute:: doc
514+
.. attribute:: doc
515515

516-
The JSON document being parsed.
516+
The JSON document being parsed.
517517

518-
.. attribute:: pos
518+
.. attribute:: pos
519519

520-
The start index of *doc* where parsing failed.
520+
The start index of *doc* where parsing failed.
521521

522-
.. attribute:: lineno
522+
.. attribute:: lineno
523523

524-
The line corresponding to *pos*.
524+
The line corresponding to *pos*.
525525

526-
.. attribute:: colno
526+
.. attribute:: colno
527527

528-
The column corresponding to *pos*.
528+
The column corresponding to *pos*.
529529

530530
.. versionadded:: 3.5
531531

Doc/library/urllib.request.rst

+39-39
Original file line numberDiff line numberDiff line change
@@ -170,15 +170,15 @@ The :mod:`urllib.request` module defines the following functions:
170170
If both lowercase and uppercase environment variables exist (and disagree),
171171
lowercase is preferred.
172172

173-
.. note::
173+
.. note::
174174

175-
If the environment variable ``REQUEST_METHOD`` is set, which usually
176-
indicates your script is running in a CGI environment, the environment
177-
variable ``HTTP_PROXY`` (uppercase ``_PROXY``) will be ignored. This is
178-
because that variable can be injected by a client using the "Proxy:" HTTP
179-
header. If you need to use an HTTP proxy in a CGI environment, either use
180-
``ProxyHandler`` explicitly, or make sure the variable name is in
181-
lowercase (or at least the ``_proxy`` suffix).
175+
If the environment variable ``REQUEST_METHOD`` is set, which usually
176+
indicates your script is running in a CGI environment, the environment
177+
variable ``HTTP_PROXY`` (uppercase ``_PROXY``) will be ignored. This is
178+
because that variable can be injected by a client using the "Proxy:" HTTP
179+
header. If you need to use an HTTP proxy in a CGI environment, either use
180+
``ProxyHandler`` explicitly, or make sure the variable name is in
181+
lowercase (or at least the ``_proxy`` suffix).
182182

183183

184184
The following classes are provided:
@@ -1407,48 +1407,48 @@ some point in the future.
14071407
:class:`URLopener` objects will raise an :exc:`OSError` exception if the server
14081408
returns an error code.
14091409

1410-
.. method:: open(fullurl, data=None)
1410+
.. method:: open(fullurl, data=None)
14111411

1412-
Open *fullurl* using the appropriate protocol. This method sets up cache and
1413-
proxy information, then calls the appropriate open method with its input
1414-
arguments. If the scheme is not recognized, :meth:`open_unknown` is called.
1415-
The *data* argument has the same meaning as the *data* argument of
1416-
:func:`urlopen`.
1412+
Open *fullurl* using the appropriate protocol. This method sets up cache and
1413+
proxy information, then calls the appropriate open method with its input
1414+
arguments. If the scheme is not recognized, :meth:`open_unknown` is called.
1415+
The *data* argument has the same meaning as the *data* argument of
1416+
:func:`urlopen`.
14171417

14181418

1419-
.. method:: open_unknown(fullurl, data=None)
1419+
.. method:: open_unknown(fullurl, data=None)
14201420

1421-
Overridable interface to open unknown URL types.
1421+
Overridable interface to open unknown URL types.
14221422

14231423

1424-
.. method:: retrieve(url, filename=None, reporthook=None, data=None)
1424+
.. method:: retrieve(url, filename=None, reporthook=None, data=None)
14251425

1426-
Retrieves the contents of *url* and places it in *filename*. The return value
1427-
is a tuple consisting of a local filename and either an
1428-
:class:`email.message.Message` object containing the response headers (for remote
1429-
URLs) or ``None`` (for local URLs). The caller must then open and read the
1430-
contents of *filename*. If *filename* is not given and the URL refers to a
1431-
local file, the input filename is returned. If the URL is non-local and
1432-
*filename* is not given, the filename is the output of :func:`tempfile.mktemp`
1433-
with a suffix that matches the suffix of the last path component of the input
1434-
URL. If *reporthook* is given, it must be a function accepting three numeric
1435-
parameters: A chunk number, the maximum size chunks are read in and the total size of the download
1436-
(-1 if unknown). It will be called once at the start and after each chunk of data is read from the
1437-
network. *reporthook* is ignored for local URLs.
1426+
Retrieves the contents of *url* and places it in *filename*. The return value
1427+
is a tuple consisting of a local filename and either an
1428+
:class:`email.message.Message` object containing the response headers (for remote
1429+
URLs) or ``None`` (for local URLs). The caller must then open and read the
1430+
contents of *filename*. If *filename* is not given and the URL refers to a
1431+
local file, the input filename is returned. If the URL is non-local and
1432+
*filename* is not given, the filename is the output of :func:`tempfile.mktemp`
1433+
with a suffix that matches the suffix of the last path component of the input
1434+
URL. If *reporthook* is given, it must be a function accepting three numeric
1435+
parameters: A chunk number, the maximum size chunks are read in and the total size of the download
1436+
(-1 if unknown). It will be called once at the start and after each chunk of data is read from the
1437+
network. *reporthook* is ignored for local URLs.
14381438

1439-
If the *url* uses the :file:`http:` scheme identifier, the optional *data*
1440-
argument may be given to specify a ``POST`` request (normally the request type
1441-
is ``GET``). The *data* argument must in standard
1442-
:mimetype:`application/x-www-form-urlencoded` format; see the
1443-
:func:`urllib.parse.urlencode` function.
1439+
If the *url* uses the :file:`http:` scheme identifier, the optional *data*
1440+
argument may be given to specify a ``POST`` request (normally the request type
1441+
is ``GET``). The *data* argument must in standard
1442+
:mimetype:`application/x-www-form-urlencoded` format; see the
1443+
:func:`urllib.parse.urlencode` function.
14441444

14451445

1446-
.. attribute:: version
1446+
.. attribute:: version
14471447

1448-
Variable that specifies the user agent of the opener object. To get
1449-
:mod:`urllib` to tell servers that it is a particular user agent, set this in a
1450-
subclass as a class variable or in the constructor before calling the base
1451-
constructor.
1448+
Variable that specifies the user agent of the opener object. To get
1449+
:mod:`urllib` to tell servers that it is a particular user agent, set this in a
1450+
subclass as a class variable or in the constructor before calling the base
1451+
constructor.
14521452

14531453

14541454
.. class:: FancyURLopener(...)

0 commit comments

Comments
 (0)