mirror of https://github.com/aristocratos/bpytop
Rename `main` to `run`
By convention, the entry point for the console script is a function called `main`. This function encompasses all the code currently in the `if __name__ == "__main__":` block. But there is already a function called `main`, for the main loop. So we rename this function to `run`, choosing a short name with similar meaning.pull/80/head
parent
95cdf83b22
commit
442802af99
|
@ -4470,7 +4470,7 @@ if __name__ == "__main__":
|
||||||
|
|
||||||
#? Main loop ------------------------------------------------------------------------------------->
|
#? Main loop ------------------------------------------------------------------------------------->
|
||||||
|
|
||||||
def main():
|
def run():
|
||||||
while not False:
|
while not False:
|
||||||
Term.refresh()
|
Term.refresh()
|
||||||
Timer.stamp()
|
Timer.stamp()
|
||||||
|
@ -4483,7 +4483,7 @@ if __name__ == "__main__":
|
||||||
|
|
||||||
#? Start main loop
|
#? Start main loop
|
||||||
try:
|
try:
|
||||||
main()
|
run()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
errlog.exception(f'{e}')
|
errlog.exception(f'{e}')
|
||||||
clean_quit(1)
|
clean_quit(1)
|
||||||
|
|
Loading…
Reference in New Issue