diff --git a/action.yml b/action.yml index 4b2d8149..73cf0622 100644 --- a/action.yml +++ b/action.yml @@ -10,7 +10,7 @@ inputs: runs: using: "composite" steps: - - run: pip install --upgrade pip && python -m pip install unimport==0.11.2 + - run: pip install --upgrade pip && python -m pip install unimport==0.11.3 shell: bash - run: unimport --color auto --gitignore --ignore-init ${{ inputs.extra_args }} shell: bash diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index a8ceb0fc..26c79358 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to this project will be documented in this file. +## [0.11.3] - 5/September/2022 + +- Fix main.py to run unimport + ## [0.11.2] - 4/September/2022 - [Fix Re complile fail mentioning 'ps_d' when using --gitignore by @hakancelikdev](https://github.com/hakancelikdev/unimport/pull/241) diff --git a/src/unimport/__init__.py b/src/unimport/__init__.py index 57c21d35..a294b04f 100644 --- a/src/unimport/__init__.py +++ b/src/unimport/__init__.py @@ -1,4 +1,4 @@ -__version__ = "0.11.2" +__version__ = "0.11.3" __description__ = ( "A linter, formatter for finding and removing unused import statements." ) diff --git a/src/unimport/__main__.py b/src/unimport/__main__.py index 744dd26a..9dd48793 100644 --- a/src/unimport/__main__.py +++ b/src/unimport/__main__.py @@ -1,7 +1,7 @@ -from unimport import color, emoji -from unimport.main import Main +def main(): + from unimport import color, emoji + from unimport.main import Main -if __name__ == "__main__": main = Main.run() if not main.is_unused_imports and main.config.check: print( @@ -13,3 +13,7 @@ ) raise SystemExit(main.exit_code()) + + +if __name__ == "__main__": + main()