Skip to content

Commit fd3dee4

Browse files
committed
🔖 2.9.0
1 parent 943e8c0 commit fd3dee4

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

CHANGELOG.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,42 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

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+
743
## [2.8.1] - 2023-03-15
844

945
### Fixed
@@ -163,6 +199,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
163199
- python-minifier package
164200
- pyminify command
165201

202+
[2.9.0]: https://github.com/dflook/python-minifier/compare/2.8.1...2.9.0
166203
[2.8.1]: https://github.com/dflook/python-minifier/compare/2.8.0...2.8.1
167204
[2.8.0]: https://github.com/dflook/python-minifier/compare/2.7.0...2.8.0
168205
[2.7.0]: https://github.com/dflook/python-minifier/compare/2.6.0...2.7.0

0 commit comments

Comments
 (0)