File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,42 @@ All notable changes to this project will be documented in this file.
4
4
The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
5
5
and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
6
6
7
+ ## [ 2.9.0] - 2023-05-01
8
+
9
+ ### Added
10
+ - A new transform to remove ` return ` statements that are not required, which is enabled by default.
11
+ e.g.
12
+
13
+ ``` python
14
+ def important (a ):
15
+ if a > 3 :
16
+ return a
17
+ if a < 2 :
18
+ return None
19
+ a.adjust(1 )
20
+ return None
21
+ ```
22
+
23
+ Will be minified to:
24
+
25
+ ``` python
26
+ def important (a ):
27
+ if a > 3 :
28
+ return a
29
+ if a < 2 :
30
+ return
31
+ a.adjust(1 )
32
+ ```
33
+
34
+ - The f-string debug specifier will now be used where possible, e.g. ` f'my_var={my_var!r}' ` will be minified to ` f'{my_var=}' ` .
35
+ The debug specifier should now be preserved where it is used in the input source.
36
+
37
+ - Many small improvements to minification to be more precise about where whitespace or parentheses required
38
+ - Thanks [ luk3yx] ( https://github.com/luk3yx ) for improving whitespace in relative import statements.
39
+ - A generator as the sole argument to a function call is no longer wrapped in parentheses
40
+ - float literals can use a more compact scientific notation
41
+ - Many more subtle improvements
42
+
7
43
## [ 2.8.1] - 2023-03-15
8
44
9
45
### Fixed
@@ -163,6 +199,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
163
199
- python-minifier package
164
200
- pyminify command
165
201
202
+ [ 2.9.0 ] : https://github.com/dflook/python-minifier/compare/2.8.1...2.9.0
166
203
[ 2.8.1 ] : https://github.com/dflook/python-minifier/compare/2.8.0...2.8.1
167
204
[ 2.8.0 ] : https://github.com/dflook/python-minifier/compare/2.7.0...2.8.0
168
205
[ 2.7.0 ] : https://github.com/dflook/python-minifier/compare/2.6.0...2.7.0
You can’t perform that action at this time.
0 commit comments