Skip to content

Commit d5a4752

Browse files
committed
Update docs
1 parent a021282 commit d5a4752

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

docs/source/transforms/convert_posargs_to_args.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Convert Positional-Only Argument to Arguments
2-
=============================================
1+
Convert Positional-Only Arguments to Arguments
2+
==============================================
33

44
This transform converts positional-only arguments into normal arguments by removing the '/' separator in the
55
argument list.

docs/source/transforms/hoist_literals.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
Hoist Literals
22
==============
33

4-
This transform replaces string and bytes literals with references to module level variables.
4+
This transform replaces string and bytes literals with references to variables.
55
It may also introduce new names for some builtin constants (True, False, None).
66
This will only be done if multiple literals can be replaced with a single variable referenced in
77
multiple locations (and the resulting code is smaller).
88

9-
If the rename_globals transform is disabled, the newly introduced names have an underscore prefix.
9+
If the rename_globals transform is disabled, the newly introduced global names have an underscore prefix.
1010

1111
This transform is always safe to use and enabled by default.
1212
Disable this source transformation by passing the ``hoist_literals=False`` argument to the :func:`python_minifier.minify` function,

docs/source/transforms/rename_locals.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,15 @@ When enabled all non-global names may be renamed if it is space efficient and sa
1313
- Local imports
1414
- Comprehension target names
1515
- Function arguments that are not typically referenced by the caller (`self`, `cls`, `args`, `kwargs`)
16-
- Function arguments may be bound with a new name in the function body, without changing the function signature
16+
- Positional only function arguments
17+
- Possible keyword function arguments may be bound with a new name in the function body, without changing the function signature
1718
- Exception handler target names
1819

1920
This will not change:
2021

2122
- Global names
2223
- Names in class scope
23-
- Lambda function arguments (except args and kwargs)
24+
- Lambda function arguments (except args/kwargs and positional only args)
2425

2526
New names are assigned according to the smallest minified result. To conserve the pool of available shortest names
2627
they are reused in sibling namespaces and shadowed in child namespaces.

0 commit comments

Comments
 (0)