Skip to content

Commit a362b87

Browse files
author
Andy C
committed
[reformat] Migrate some long signatures to "tall" format
1 parent 5bfca40 commit a362b87

File tree

4 files changed

+36
-14
lines changed

4 files changed

+36
-14
lines changed

builtin/printf_osh.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,14 @@ def __init__(
185185
# this object initialized in main()
186186
self.shell_start_time = time_.time()
187187

188-
def _Percent(self, pr, part, varargs, locs):
189-
# type: (_PrintfState, printf_part.Percent, List[str], List[CompoundWord]) -> Optional[str]
188+
def _Percent(
189+
self,
190+
pr, # type: _PrintfState
191+
part, # type: printf_part.Percent
192+
varargs, # type: List[str]
193+
locs, # type: List[CompoundWord]
194+
):
195+
# type: (...) -> Optional[str]
190196

191197
num_args = len(varargs)
192198

core/process.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -808,9 +808,16 @@ def Run(self):
808808
class SubProgramThunk(Thunk):
809809
"""A subprogram that can be executed in another process."""
810810

811-
def __init__(self, cmd_ev, node, trap_state, multi_trace, inherit_errexit,
812-
inherit_errtrace):
813-
# type: (CommandEvaluator, command_t, trap_osh.TrapState, dev.MultiTracer, bool, bool) -> None
811+
def __init__(
812+
self,
813+
cmd_ev, # type: CommandEvaluator
814+
node, # type: command_t
815+
trap_state, # type: trap_osh.TrapState
816+
multi_trace, # type: dev.MultiTracer
817+
inherit_errexit, # type: bool
818+
inherit_errtrace, # type: bool
819+
):
820+
# type: (...) -> None
814821
self.cmd_ev = cmd_ev
815822
self.node = node
816823
self.trap_state = trap_state

core/state.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1186,8 +1186,14 @@ def __exit__(self, type, value, traceback):
11861186
class ctx_Eval(object):
11871187
"""Push temporary set of variables, $0, $1, $2, etc."""
11881188

1189-
def __init__(self, mem, dollar0, pos_args, vars):
1190-
# type: (Mem, Optional[str], Optional[List[str]], Optional[Dict[str, value_t]]) -> None
1189+
def __init__(
1190+
self,
1191+
mem, # type: Mem
1192+
dollar0, # type: Optional[str]
1193+
pos_args, # type: Optional[List[str]]
1194+
vars, # type: Optional[Dict[str, value_t]]
1195+
):
1196+
# type: (...) -> None
11911197
self.mem = mem
11921198
self.dollar0 = dollar0
11931199
self.pos_args = pos_args

frontend/typed_args.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,16 @@ class Reader(object):
113113
ReaderForProc()
114114
"""
115115

116-
def __init__(self,
117-
pos_args,
118-
named_args,
119-
block_arg,
120-
arg_list,
121-
is_bound=False):
122-
# type: (List[value_t], Dict[str, value_t], Optional[value_t], ArgList, bool) -> None
116+
def __init__(
117+
self,
118+
pos_args, # type: List[value_t]
119+
named_args, # type: Dict[str, value_t]
120+
block_arg, # type: Optional[value_t]
121+
arg_list, # type: ArgList
122+
is_bound=False, # type: bool
123+
):
124+
# type: (...) -> None
125+
123126
self.pos_args = pos_args
124127
self.pos_consumed = 0
125128
# TODO: Add LHS of attribute expression to value.BoundFunc and pass

0 commit comments

Comments
 (0)