Skip to content
Myr

Fix ruff E501 line-too-long in PowerShell template

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Zhihua Lai · committed by Zhihua Lai · parent 27b3ee2 · Browse files · 1 file+5 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−3 removed

  • other:+5 added−3 removed

1 file+5 added−3 removed

modified:src/click/shell_completion.py+5 added-3 removed
226 unmodified lines
227 }228229 if (-not $response) { return }230231 $prefix = "$wordToComplete*"232 $lines = $response -split "`n"233 for ($i = 0; $i + 2 -lt $lines.Count; $i += 3) {234 $type = $lines[$i]235 $value = $lines[$i + 1]
4 unmodified lines
240 $tip = if ($descr -and $descr -ne '_') { $descr } else { $value }241 [System.Management.Automation.CompletionResult]::new(242 $value, $value, 'ParameterValue', $tip)243 } elseif ($type -eq 'dir') {243 Get-ChildItem -Directory -Path "$wordToComplete*" -ErrorAction SilentlyContinue |244 Get-ChildItem -Directory -Path $prefix -ErrorAction SilentlyContinue |245 ForEach-Object {246 [System.Management.Automation.CompletionResult]::new(247 $_.FullName, $_.Name, 'ProviderContainer', $_.FullName)248 }249 } elseif ($type -eq 'file') {249 Get-ChildItem -Path "$wordToComplete*" -ErrorAction SilentlyContinue |250 Get-ChildItem -Path $prefix -ErrorAction SilentlyContinue |251 ForEach-Object {251 $kind = if ($_.PSIsContainer) { 'ProviderContainer' } else { 'ProviderItem' }252 $kind = 'ProviderItem'253 if ($_.PSIsContainer) { $kind = 'ProviderContainer' }254 [System.Management.Automation.CompletionResult]::new(255 $_.FullName, $_.Name, $kind, $_.FullName)256 }257 }
520 unmodified lines