Skip to content

Commit 43a9fcd

Browse files
committed
remove 2to3fixer sphinx type
1 parent 6ceecb1 commit 43a9fcd

File tree

2 files changed

+46
-54
lines changed

2 files changed

+46
-54
lines changed

docs/conf.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,6 @@
1313

1414
from __future__ import generator_stop
1515

16-
import os
17-
import sys
18-
19-
# If extensions (or modules to document with autodoc) are in another directory,
20-
# add these directories to sys.path here. If the directory is relative to the
21-
# documentation root, use os.path.abspath to make it absolute, like shown here.
22-
sys.path.insert(0, os.path.abspath("sphinxext"))
23-
2416
# -- General configuration ------------------------------------------------
2517

2618
# If your documentation needs a minimal Sphinx version, state it here.
@@ -29,7 +21,7 @@
2921
# Add any Sphinx extension module names here, as strings. They can be
3022
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3123
# ones.
32-
extensions = ["extra_types", "sphinx.ext.intersphinx"]
24+
extensions = ["sphinx.ext.intersphinx"]
3325

3426
# Add any paths that contain templates here, relative to this directory.
3527
templates_path = ["_templates"]

docs/fixers.rst

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@ The `six project`_ provides the ``six`` module which contains various tidbits in
5555
helping to support Python 2/3 code. All ``six``-related fixers assume the latest
5656
version of ``six`` is installed.
5757

58-
.. 2to3fixer:: basestring
58+
.. attribute:: basestring
5959

6060
Replaces all references to :func:`basestring` with :data:`six.string_types`.
6161

6262
.. versionadded:: 0.4
6363

64-
.. 2to3fixer:: dict_six
64+
.. attribute:: dict_six
6565

6666
Fixes various methods on the ``dict`` type for getting all keys, values, or
6767
items. E.g.::
@@ -79,13 +79,13 @@ version of ``six`` is installed.
7979
Care is taken to only call ``list()`` when not in an iterating context
8080
(e.g. not the iterable for a ``for`` loop).
8181

82-
.. 2to3fixer:: filter
82+
.. attribute:: filter
8383

8484
When a call to :func:`filter <python2:filter>` is discovered, ``from six.moves import filter`` is
8585
added to the module. Wrapping the use in a call to ``list()`` is done when
8686
necessary.
8787

88-
.. 2to3fixer:: imports_six
88+
.. attribute:: imports_six
8989

9090
Uses :mod:`six.moves` to fix various renamed modules, e.g.::
9191

@@ -139,7 +139,7 @@ version of ``six`` is installed.
139139

140140
.. versionadded:: 0.4
141141

142-
.. 2to3fixer:: input_six
142+
.. attribute:: input_six
143143

144144
Changes::
145145

@@ -154,18 +154,18 @@ version of ``six`` is installed.
154154

155155
.. versionadded:: 0.4
156156

157-
.. 2to3fixer:: int_long_tuple
157+
.. attribute:: int_long_tuple
158158

159159
Changes ``(int, long)`` or ``(long, int)`` to :data:`six.integer_types`.
160160

161161
.. versionadded:: 0.4
162162

163-
.. 2to3fixer:: map
163+
.. attribute:: map
164164

165165
If a call to :func:`map <python2:map>` is discovered, ``from six.moves import map`` is added to
166166
the module. Wrapping the use in a call to ``list()`` is done when necessary.
167167

168-
.. 2to3fixer:: metaclass
168+
.. attribute:: metaclass
169169

170170
Changes::
171171

@@ -181,16 +181,16 @@ version of ``six`` is installed.
181181
.. seealso::
182182
:func:`six.with_metaclass`
183183

184-
.. 2to3fixer:: raise_six
184+
.. attribute:: raise_six
185185

186186
Changes ``raise E, V, T`` to ``six.reraise(E, V, T)``.
187187

188-
.. 2to3fixer:: unicode_type
188+
.. attribute:: unicode_type
189189

190190
Changes all reference of :func:`unicode <python2:unicode>` to
191191
:data:`six.text_type`.
192192

193-
.. 2to3fixer:: urllib_six
193+
.. attribute:: urllib_six
194194

195195
Changes::
196196

@@ -202,12 +202,12 @@ version of ``six`` is installed.
202202
from six.moves.urllib.parse import quote_plus
203203
quote_plus('hello world')
204204

205-
.. 2to3fixer:: unichr
205+
.. attribute:: unichr
206206

207207
Changes all reference of :func:`unichr <python2:unichr>` to
208208
:data:`six.unichr`.
209209

210-
.. 2to3fixer:: xrange_six
210+
.. attribute:: xrange_six
211211

212212
Changes::
213213

@@ -223,7 +223,7 @@ version of ``six`` is installed.
223223
Care is taken not to call ``list()`` when ``range()`` is used in an iterating
224224
context.
225225

226-
.. 2to3fixer:: zip
226+
.. attribute:: zip
227227

228228
If :func:`zip <python2:zip>` is called, ``from six.moves import zip`` is added to the module.
229229
Wrapping the use in a call to ``list()`` is done when necessary.
@@ -236,57 +236,57 @@ Some :doc:`fixers from fissix <fissix:fixers>`
236236
in Python's standard library are run by default unmodified as their
237237
transformations are Python 2 compatible.
238238

239-
- :2to3fixer:`apply <python:apply>`
240-
- :2to3fixer:`except <python:except>`
241-
- :2to3fixer:`exec <python:exec>`
242-
- :2to3fixer:`execfile <python:execfile>`
243-
- :2to3fixer:`exitfunc <python:exitfunc>`
244-
- :2to3fixer:`funcattrs <python:funcattrs>`
245-
- :2to3fixer:`has_key <python:has_key>`
246-
- :2to3fixer:`idioms <python:idioms>`
247-
- :2to3fixer:`long <python:long>`
248-
- :2to3fixer:`methodattrs <python:methodattrs>`
249-
- :2to3fixer:`ne <python:ne>`
250-
- :2to3fixer:`numliterals <python:numliterals>`
251-
- :2to3fixer:`operator <python:operator>`
252-
- :2to3fixer:`paren <python:paren>`
253-
- :2to3fixer:`reduce <python:reduce>`
254-
- :2to3fixer:`repr <python:repr>`
255-
- :2to3fixer:`set_literal <python:set_literal>`
256-
- :2to3fixer:`standarderror <python:standarderror>`
257-
- :2to3fixer:`sys_exc <python:sys_exc>`
258-
- :2to3fixer:`throw <python:throw>`
259-
- :2to3fixer:`tuple_params <python:tuple_params>`
260-
- :2to3fixer:`types <python:types>`
261-
- :2to3fixer:`ws_comma <python:ws_comma>`
262-
- :2to3fixer:`xreadlines <python:xreadlines>`
239+
- :attr:`apply <fissix:apply>`
240+
- :attr:`except <fissix:except>`
241+
- :attr:`exec <fissix:exec>`
242+
- :attr:`execfile <fissix:execfile>`
243+
- :attr:`exitfunc <fissix:exitfunc>`
244+
- :attr:`funcattrs <fissix:funcattrs>`
245+
- :attr:`has_key <fissix:has_key>`
246+
- :attr:`idioms <fissix:idioms>`
247+
- :attr:`long <fissix:long>`
248+
- :attr:`methodattrs <fissix:methodattrs>`
249+
- :attr:`ne <fissix:ne>`
250+
- :attr:`numliterals <fissix:numliterals>`
251+
- :attr:`operator <fissix:operator>`
252+
- :attr:`paren <fissix:paren>`
253+
- :attr:`reduce <fissix:reduce>`
254+
- :attr:`repr <fissix:repr>`
255+
- :attr:`set_literal <fissix:set_literal>`
256+
- :attr:`standarderror <fissix:standarderror>`
257+
- :attr:`sys_exc <fissix:sys_exc>`
258+
- :attr:`throw <fissix:throw>`
259+
- :attr:`tuple_params <fissix:tuple_params>`
260+
- :attr:`types <fissix:types>`
261+
- :attr:`ws_comma <fissix:ws_comma>`
262+
- :attr:`xreadlines <fissix:xreadlines>`
263263

264264
Fixers with no dependencies
265265
+++++++++++++++++++++++++++
266266

267-
.. 2to3fixer:: file
267+
.. attribute:: file
268268

269269
Changes all calls to :func:`file <python2:file>` to :func:`open <python2:open>`.
270270

271271
.. versionadded:: 0.4
272272

273-
.. 2to3fixer:: import
273+
.. attribute:: import
274274

275275
Changes implicit relative imports to explicit relative imports and adds
276276
``from __future__ import absolute_import``.
277277

278278
.. versionadded:: 0.4
279279

280-
.. 2to3fixer:: next
280+
.. attribute:: next
281281

282282
Changes all method calls from ``x.next()`` to ``next(x)``.
283283

284-
.. 2to3fixer:: print
284+
.. attribute:: print
285285

286286
Changes all usage of the ``print`` statement to use the :func:`print` function
287287
and adds ``from __future__ import print_function``.
288288

289-
.. 2to3fixer:: raise
289+
.. attribute:: raise
290290

291291
Changes comma-based ``raise`` statements from::
292292

@@ -307,7 +307,7 @@ to specify the ``-f default`` or ``--fix=default`` option, e.g.::
307307

308308
python -m modernize -f default -f libmodernize.fixes.fix_open
309309

310-
.. 2to3fixer:: classic_division
310+
.. attribute:: classic_division
311311

312312
When a use of the division operator -- ``/`` -- is found, add
313313
``from __future__ import division`` and change the operator to ``//``.
@@ -328,7 +328,7 @@ to specify the ``-f default`` or ``--fix=default`` option, e.g.::
328328

329329
.. versionadded:: 1.0
330330

331-
.. 2to3fixer:: open
331+
.. attribute:: open
332332

333333
When a call to :func:`open <python2:open>` is discovered, add ``from io import open`` at the top
334334
of the module so as to use :func:`io.open` instead. This fixer is opt-in because it

0 commit comments

Comments
 (0)