brentvollebregt / auto-py-to-exe

Converts .py to .exe using a simple graphical interface
MIT License
3.95k stars 677 forks source link

No need to use if statement for version checking #455

Closed rly0nheart closed 8 months ago

rly0nheart commented 8 months ago

Remove if statement used for checking version info

This is probably not an important contribution, but I hope it's okay😅

I noticed you use an if statement to allow users to check version

if args.version:
    print(__version__)

However, argparse provides an argument specifically for versions, and it handles the rest

parser.add_argument("-v", "--version", action="version", version=__version__)

This will also add a help message for the version flag.

I also used black to format the code

New feature checklist

Translation checklist

brentvollebregt commented 8 months ago

Can you please revert the formatting changes? I prefer the set of changes to be targeted at one thing.

rly0nheart commented 8 months ago

Sure thing!

rly0nheart commented 8 months ago

Done, I opened a new issue with the change.