Skip to content

Commit bd313b4

Browse files
committed
Fix line length
1 parent 4b49294 commit bd313b4

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/cleo/commands/completions/templates.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@
122122
%(cmds_opts)s"""
123123

124124

125-
POWERSHELL_TEMPLATE = """\
125+
POWERSHELL_TEMPLATE = (
126+
"""\
126127
$%(function)s = {
127128
param(
128129
[string] $wordToComplete,
@@ -133,19 +134,23 @@
133134
$options = %(opts)s
134135
$commands = %(cmds)s
135136
136-
if ($wordToComplete -notlike '--*' -and $wordToComplete -notlike "" -and ($commandAst.CommandElements.Count -eq "2")) {
137+
if ($wordToComplete -notlike '--*' -and $wordToComplete -notlike "" -and """
138+
"""($commandAst.CommandElements.Count -eq "2")) {
137139
return $commands | Where-Object { $_ -like "$wordToComplete*" }
138140
}
139141
140-
$result = $commandAst.CommandElements | Select-Object -Skip 1 | Where-Object { $_ -notlike '--*' }
142+
$result = $commandAst.CommandElements | Select-Object -Skip 1 | """
143+
"""Where-Object { $_ -notlike '--*' }
141144
switch ($result -Join " " ) {
142145
%(cmds_opts)s
143146
}
144147
145148
return $options | Where-Object { $_ -like "$wordToComplete*" }
146149
}
147150
148-
Register-ArgumentCompleter -Native -CommandName %(script_name)s -ScriptBlock $%(function)s"""
151+
Register-ArgumentCompleter -Native -CommandName %(script_name)s """
152+
"""-ScriptBlock $%(function)s"""
153+
)
149154

150155
TEMPLATES = {
151156
"bash": BASH_TEMPLATE,

0 commit comments

Comments
 (0)