MCPcopy
hub / github.com/psf/black / inline_comments_in_brackets_ruin_everything

Function inline_comments_in_brackets_ruin_everything

tests/data/cases/comments2.py:61–147  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

59
60# Comment before function.
61def inline_comments_in_brackets_ruin_everything():
62 if typedargslist:
63 parameters.children = [
64 children[0], # (1
65 body,
66 children[-1] # )1
67 ]
68 parameters.children = [
69 children[0],
70 body,
71 children[-1], # type: ignore
72 ]
73 else:
74 parameters.children = [
75 parameters.children[0], # (2 what if this was actually long
76 body,
77 parameters.children[-1], # )2
78 ]
79 parameters.children = [parameters.what_if_this_was_actually_long.children[0], body, parameters.children[-1]] # type: ignore
80 if (self._proc is not None
81 # has the child process finished?
82 and self._returncode is None
83 # the child process has finished, but the
84 # transport hasn't been notified yet?
85 and self._proc.poll() is None):
86 pass
87 # no newline before or after
88 short = [
89 # one
90 1,
91 # two
92 2]
93
94 # no newline after
95 call(arg1, arg2, """
96short
97""", arg3=True)
98
99 ############################################################################
100
101 call2(
102 #short
103 arg1,
104 #but
105 arg2,
106 #multiline
107 """
108short
109""",
110 # yup
111 arg3=True)
112 lcomp = [
113 element # yup
114 for element in collection # yup
115 if element is not None # right
116 ]
117 lcomp2 = [
118 # hello

Callers

nothing calls this directly

Calls 2

NodeClass · 0.85
LeafClass · 0.85

Tested by

no test coverage detected