File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -174,6 +174,9 @@ code base is implemented in.
174
174
- [ ] Investigate ways of extracting and backporting Python3.10+ ` ast ` implementation to lower Python versions.
175
175
176
176
## Release notes
177
+ - v2.4.1:
178
+ - Add ` --version ` option to show ` deadcode ` version.
179
+ - Use stdout for ` deadcode ` output.
177
180
- v2.4.0:
178
181
- Add ` --only ` option that accepts filenames only which will be reflected in the output and modified.
179
182
This option can be used with ` --fix ` and ` --fix --dry ` options as well as for simple unused code detection without fixing.
Original file line number Diff line number Diff line change @@ -37,5 +37,10 @@ def main(
37
37
return None
38
38
39
39
40
+ def print_main () -> None :
41
+ if result := main ():
42
+ print (result )
43
+
44
+
40
45
if __name__ == '__main__' :
41
- main ()
46
+ print_main ()
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ test = [
33
33
]
34
34
35
35
[project .scripts ]
36
- deadcode = " deadcode.cli:main "
36
+ deadcode = " deadcode.cli:print_main "
37
37
38
38
[project .urls ]
39
39
homepage = " https://github.com/albertas/deadcode"
You can’t perform that action at this time.
0 commit comments