Remove 'if __name__ == __main__' clauses in all python scripts
This commit is contained in:
parent
24c4ae781b
commit
04aade74eb
2
ddusb.py
2
ddusb.py
@ -5,7 +5,7 @@ import argparse
|
||||
import pathlib
|
||||
import subprocess
|
||||
|
||||
if __name__ == '__main__':
|
||||
# ========== Main Script ==========
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("-b", "--bs",
|
||||
default=512,
|
||||
|
@ -17,8 +17,7 @@ DEFAULT_FILENAME = f"{pathlib.Path.home()}/Music/%(title)s.%(ext)s"
|
||||
# ========== Error Codes ==========
|
||||
E_NOURLS = 2
|
||||
|
||||
# =========== Functions ==========
|
||||
if __name__ == '__main__':
|
||||
# ========== Main Script ==========
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('-b', '--batchfile',
|
||||
type=str,
|
||||
|
@ -51,7 +51,7 @@ def convert_to_celsius(mkel_temp):
|
||||
return (mkel_temp/1000) - 273.15
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
# ========== Main Script ==========
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('device', help='device node to retrieve\
|
||||
the temperature for', metavar='dev')
|
||||
|
@ -4,9 +4,10 @@
|
||||
import argparse
|
||||
import requests
|
||||
|
||||
# ========== Constants ==========
|
||||
WTTR_URI = 'http://wttr.in'
|
||||
|
||||
if __name__ == '__main__':
|
||||
# ========== Main Script ==========
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('location')
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user