Skip to content

Commit 943e8c0

Browse files
committed
Add remove-explicit-return-none to index
1 parent fe090d1 commit 943e8c0

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

docs/source/transforms/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ They can be enabled or disabled through the minify function, or passing options
1818
remove_object_base
1919
convert_posargs_to_args
2020
preserve_shebang
21+
remove_explicit_return_none
2122

2223
.. toctree::
2324
:caption: Disabled by default

docs/source/transforms/remove_explicit_return_none.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
Remove Explicit Return None
22
===========================
33

4-
This transforms any ``return None`` statement into a ``return`` statement.
5-
A return statement with no value is equivalent to ``return None``.
6-
7-
Removes any ``return None`` or ``return`` statements that are the last statement in a function.
4+
This transforms any ``return None`` statement into a ``return`` statement, as return statement with no value is equivalent to ``return None``.
5+
Also removes any ``return None`` or ``return`` statements that are the last statement in a function.
86

97
The transform is always safe to use and enabled by default. Disable by passing the ``remove_explicit_return_none=False`` argument to the :func:`python_minifier.minify` function,
108
or passing ``--no-remove-explicit-remove-none`` to the pyminify command.

0 commit comments

Comments
 (0)