Skip to content

Commit 18c05a4

Browse files
committed
reformat python files (except pncconf.py)
1 parent 76e7852 commit 18c05a4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+34017
-17335
lines changed

src/emc/ini/update_ini.py

Lines changed: 343 additions & 261 deletions
Large diffs are not rendered by default.

src/emc/usr_intf/axis/makeicon.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@
2727
icon = icon.encode("hex")
2828
print("icon = (")
2929
for i in range(0, len(icon), 72):
30-
print(repr(icon[i:i+72]))
30+
print(repr(icon[i : i + 72]))
3131
print(").decode('hex')")

src/emc/usr_intf/axis/scripts/axis-remote.py

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,37 +31,40 @@
3131
UNSPECIFIED, OPEN, RELOAD, PING, CLEAR, MDI, QUIT = list(range(7))
3232
mode = UNSPECIFIED
3333

34+
3435
def usage(exitval=0):
3536
print(__doc__)
3637
raise SystemExit(exitval)
3738

39+
3840
try:
39-
opts, args = getopt.getopt(sys.argv[1:], "h?prqcm",
40-
['help','ping', 'reload', 'quit', 'clear', 'mdi'])
41+
opts, args = getopt.getopt(
42+
sys.argv[1:], "h?prqcm", ["help", "ping", "reload", "quit", "clear", "mdi"]
43+
)
4144
except getopt.GetoptError as detail:
4245
print(detail)
4346
usage(99)
4447

4548
for o, a in opts:
46-
if o in ('-h', '-?', '--help'):
49+
if o in ("-h", "-?", "--help"):
4750
usage(0)
48-
elif o in ('-c', '--clear'):
51+
elif o in ("-c", "--clear"):
4952
if mode != UNSPECIFIED:
5053
usage(99)
5154
mode = CLEAR
52-
elif o in ('-p', '--ping'):
55+
elif o in ("-p", "--ping"):
5356
if mode != UNSPECIFIED:
5457
usage(99)
5558
mode = PING
56-
elif o in ('-r', '--reload'):
59+
elif o in ("-r", "--reload"):
5760
if mode != UNSPECIFIED:
5861
usage(99)
5962
mode = RELOAD
60-
elif o in ('-q', '--quit'):
63+
elif o in ("-q", "--quit"):
6164
if mode != UNSPECIFIED:
6265
usage(99)
6366
mode = QUIT
64-
elif o in ('-m', '--mdi'):
67+
elif o in ("-m", "--mdi"):
6568
if mode != UNSPECIFIED:
6669
usage(99)
6770
mode = MDI
@@ -78,7 +81,8 @@ def usage(exitval=0):
7881
if len(args) != 0:
7982
usage(99)
8083

81-
t = tkinter.Tk(); t.wm_withdraw()
84+
t = tkinter.Tk()
85+
t.wm_withdraw()
8286

8387
msg = ""
8488
try:
@@ -90,15 +94,17 @@ def usage(exitval=0):
9094
# cmds below are checked for suitability by axis remote() function
9195
# return "" if ok
9296
elif mode == OPEN:
93-
msg = t.tk.call("send", "axis", ("remote","open_file_name", os.path.abspath(args[0])))
97+
msg = t.tk.call(
98+
"send", "axis", ("remote", "open_file_name", os.path.abspath(args[0]))
99+
)
94100
elif mode == MDI:
95-
msg = t.tk.call("send", "axis", ("remote","send_mdi_command", args[0]))
101+
msg = t.tk.call("send", "axis", ("remote", "send_mdi_command", args[0]))
96102
elif mode == RELOAD:
97-
msg = t.tk.call("send", "axis", ("remote","reload_file"))
103+
msg = t.tk.call("send", "axis", ("remote", "reload_file"))
98104
elif mode == CLEAR:
99-
msg = t.tk.call("send", "axis", ("remote","clear_live_plot"))
105+
msg = t.tk.call("send", "axis", ("remote", "clear_live_plot"))
100106
elif mode == QUIT:
101-
msg = t.tk.call("send", "axis", ("remote","destroy"))
107+
msg = t.tk.call("send", "axis", ("remote", "destroy"))
102108
except tkinter.TclError as detail:
103109
raise SystemExit(detail)
104110

0 commit comments

Comments
 (0)