Skip to content

Commit 4ee34e1

Browse files
authored
[3.5] bpo-30178: Indent methods and attributes of MimeType class (GH-1306) (#1571)
(cherry picked from commit c711680)
1 parent 5e94ded commit 4ee34e1

File tree

1 file changed

+43
-43
lines changed

1 file changed

+43
-43
lines changed

Doc/library/mimetypes.rst

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -186,78 +186,78 @@ than one MIME-type database; it provides an interface similar to the one of the
186186
loaded "on top" of the default database.
187187

188188

189-
.. attribute:: MimeTypes.suffix_map
189+
.. attribute:: MimeTypes.suffix_map
190190

191-
Dictionary mapping suffixes to suffixes. This is used to allow recognition of
192-
encoded files for which the encoding and the type are indicated by the same
193-
extension. For example, the :file:`.tgz` extension is mapped to :file:`.tar.gz`
194-
to allow the encoding and type to be recognized separately. This is initially a
195-
copy of the global :data:`suffix_map` defined in the module.
191+
Dictionary mapping suffixes to suffixes. This is used to allow recognition of
192+
encoded files for which the encoding and the type are indicated by the same
193+
extension. For example, the :file:`.tgz` extension is mapped to :file:`.tar.gz`
194+
to allow the encoding and type to be recognized separately. This is initially a
195+
copy of the global :data:`suffix_map` defined in the module.
196196

197197

198-
.. attribute:: MimeTypes.encodings_map
198+
.. attribute:: MimeTypes.encodings_map
199199

200-
Dictionary mapping filename extensions to encoding types. This is initially a
201-
copy of the global :data:`encodings_map` defined in the module.
200+
Dictionary mapping filename extensions to encoding types. This is initially a
201+
copy of the global :data:`encodings_map` defined in the module.
202202

203203

204-
.. attribute:: MimeTypes.types_map
204+
.. attribute:: MimeTypes.types_map
205205

206-
Tuple containing two dictionaries, mapping filename extensions to MIME types:
207-
the first dictionary is for the non-standards types and the second one is for
208-
the standard types. They are initialized by :data:`common_types` and
209-
:data:`types_map`.
206+
Tuple containing two dictionaries, mapping filename extensions to MIME types:
207+
the first dictionary is for the non-standards types and the second one is for
208+
the standard types. They are initialized by :data:`common_types` and
209+
:data:`types_map`.
210210

211211

212-
.. attribute:: MimeTypes.types_map_inv
212+
.. attribute:: MimeTypes.types_map_inv
213213

214-
Tuple containing two dictionaries, mapping MIME types to a list of filename
215-
extensions: the first dictionary is for the non-standards types and the
216-
second one is for the standard types. They are initialized by
217-
:data:`common_types` and :data:`types_map`.
214+
Tuple containing two dictionaries, mapping MIME types to a list of filename
215+
extensions: the first dictionary is for the non-standards types and the
216+
second one is for the standard types. They are initialized by
217+
:data:`common_types` and :data:`types_map`.
218218

219219

220-
.. method:: MimeTypes.guess_extension(type, strict=True)
220+
.. method:: MimeTypes.guess_extension(type, strict=True)
221221

222-
Similar to the :func:`guess_extension` function, using the tables stored as part
223-
of the object.
222+
Similar to the :func:`guess_extension` function, using the tables stored as part
223+
of the object.
224224

225225

226-
.. method:: MimeTypes.guess_type(url, strict=True)
226+
.. method:: MimeTypes.guess_type(url, strict=True)
227227

228-
Similar to the :func:`guess_type` function, using the tables stored as part of
229-
the object.
228+
Similar to the :func:`guess_type` function, using the tables stored as part of
229+
the object.
230230

231231

232-
.. method:: MimeTypes.guess_all_extensions(type, strict=True)
232+
.. method:: MimeTypes.guess_all_extensions(type, strict=True)
233233

234-
Similar to the :func:`guess_all_extensions` function, using the tables stored
235-
as part of the object.
234+
Similar to the :func:`guess_all_extensions` function, using the tables stored
235+
as part of the object.
236236

237237

238-
.. method:: MimeTypes.read(filename, strict=True)
238+
.. method:: MimeTypes.read(filename, strict=True)
239239

240-
Load MIME information from a file named *filename*. This uses :meth:`readfp` to
241-
parse the file.
240+
Load MIME information from a file named *filename*. This uses :meth:`readfp` to
241+
parse the file.
242242

243-
If *strict* is ``True``, information will be added to list of standard types,
244-
else to the list of non-standard types.
243+
If *strict* is ``True``, information will be added to list of standard types,
244+
else to the list of non-standard types.
245245

246246

247-
.. method:: MimeTypes.readfp(fp, strict=True)
247+
.. method:: MimeTypes.readfp(fp, strict=True)
248248

249-
Load MIME type information from an open file *fp*. The file must have the format of
250-
the standard :file:`mime.types` files.
249+
Load MIME type information from an open file *fp*. The file must have the format of
250+
the standard :file:`mime.types` files.
251251

252-
If *strict* is ``True``, information will be added to the list of standard
253-
types, else to the list of non-standard types.
252+
If *strict* is ``True``, information will be added to the list of standard
253+
types, else to the list of non-standard types.
254254

255255

256-
.. method:: MimeTypes.read_windows_registry(strict=True)
256+
.. method:: MimeTypes.read_windows_registry(strict=True)
257257

258-
Load MIME type information from the Windows registry. Availability: Windows.
258+
Load MIME type information from the Windows registry. Availability: Windows.
259259

260-
If *strict* is ``True``, information will be added to the list of standard
261-
types, else to the list of non-standard types.
260+
If *strict* is ``True``, information will be added to the list of standard
261+
types, else to the list of non-standard types.
262262

263-
.. versionadded:: 3.2
263+
.. versionadded:: 3.2

0 commit comments

Comments
 (0)