import sys
from ubitflashtool.cli import main
from ubitflashtool.gui import open_editor


if __name__ == "__main__":
    if len(sys.argv) > 1 and (sys.argv[1] == '-g' or sys.argv[1] == '--gui'):
        open_editor()
    else:
        main(sys.argv[1:])

import sys
from ubitflashtool.cli import main as cli_main
from ubitflashtool.gui import open_editor

def main():
    if len(sys.argv) > 1 and (sys.argv[1] == '-g' or sys.argv[1] == '--gui'):
        open_editor()
    else:
        cli_main(sys.argv[1:])

if __name__ == "__main__":
    main()

Fix command line entry point
Fix command line entry point

  import sys
- from ubitflashtool.cli import main
+ from ubitflashtool.cli import main as cli_main
  from ubitflashtool.gui import open_editor
  
+ def main():
- 
- if __name__ == "__main__":
      if len(sys.argv) > 1 and (sys.argv[1] == '-g' or sys.argv[1] == '--gui'):
          open_editor()
      else:
-         main(sys.argv[1:])
+         cli_main(sys.argv[1:])
  
+ if __name__ == "__main__":
+     main()
+ 
Fix command line entry point
## Code Before:
import sys
from ubitflashtool.cli import main
from ubitflashtool.gui import open_editor


if __name__ == "__main__":
    if len(sys.argv) > 1 and (sys.argv[1] == '-g' or sys.argv[1] == '--gui'):
        open_editor()
    else:
        main(sys.argv[1:])

## Instruction:
Fix command line entry point
## Code After:
import sys
from ubitflashtool.cli import main as cli_main
from ubitflashtool.gui import open_editor

def main():
    if len(sys.argv) > 1 and (sys.argv[1] == '-g' or sys.argv[1] == '--gui'):
        open_editor()
    else:
        cli_main(sys.argv[1:])

if __name__ == "__main__":
    main()
