Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

1import pytest
2from mock import patch
3from thefuck.rules import pacman
4from thefuck.rules.pacman import match, get_new_command
5from tests.utils import Command
6
7
8pacman_cmd = getattr(pacman, 'pacman', 'pacman')
9
10PKGFILE_OUTPUT_SUDO = 'core/sudo 1.8.13-13/usr/bin/sudo'
11PKGFILE_OUTPUT_CONVERT = 'extra/imagemagick 6.9.1.0-1\t/usr/bin/convert'
…lines 12–16 unchanged (5 lines)
17extra/vim-python3 7.4.712-1 \t/usr/bin/vim'''
18
19
20@pytest.mark.skipif(not getattr(pacman, 'enabled_by_default', True),
21 reason='Skip if pacman is not available')
22@pytest.mark.parametrize('command', [
23 Command(script='vim', stderr='vim: command not found'),
24 Command(script='sudo vim', stderr='sudo: vim: command not found')])
25def test_match(command):
26 assert match(command)
27
28
29@pytest.mark.parametrize('command, return_value', [
30 (Command(script='vim', stderr='vim: command not found'), PKGFILE_OUTPUT_VIM),
31 (Command(script='sudo vim', stderr='sudo: vim: command not found'), PKGFILE_OUTPUT_VIM)])
32@patch('thefuck.specific.archlinux.subprocess')
33@patch.multiple(pacman, create=True, pacman=pacman_cmd)
34def test_match_mocked(subp_mock, command, return_value):
35 subp_mock.check_output.return_value = return_value
36 assert match(command)
37
38
39@pytest.mark.parametrize('command', [
40 Command(script='vim', stderr=''), Command(),
41 Command(script='sudo vim', stderr=''), Command()])
42def test_not_match(command):
43 assert not match(command)
44
45
46sudo_vim_possibilities = ['{} -S extra/gvim && sudo vim',
47 '{} -S extra/gvim-python3 && sudo vim',
…lines 48–57 unchanged (10 lines)
58vim_possibilities = [s.format(pacman_cmd) for s in vim_possibilities]
59
60
61@pytest.mark.skipif(not getattr(pacman, 'enabled_by_default', True),
62 reason='Skip if pacman is not available')
63@pytest.mark.parametrize('command, new_command', [
64 (Command('vim'), vim_possibilities),
65 (Command('sudo vim'), sudo_vim_possibilities),
66 (Command('convert'), ['{} -S extra/imagemagick && convert'.format(pacman_cmd)]),
67 (Command('sudo convert'), ['{} -S extra/imagemagick && sudo convert'.format(pacman_cmd)])])
68def test_get_new_command(command, new_command, mocker):
69 assert get_new_command(command) == new_command
70
71
72@pytest.mark.parametrize('command, new_command, return_value', [
73 (Command('vim'), vim_possibilities, PKGFILE_OUTPUT_VIM),
74 (Command('sudo vim'), sudo_vim_possibilities, PKGFILE_OUTPUT_VIM),
75 (Command('convert'), ['{} -S extra/imagemagick && convert'.format(pacman_cmd)], PKGFILE_OUTPUT_CONVERT),
76 (Command('sudo'), ['{} -S core/sudo && sudo'.format(pacman_cmd)], PKGFILE_OUTPUT_SUDO),
77 (Command('sudo convert'), ['{} -S extra/imagemagick && sudo convert'.format(pacman_cmd)], PKGFILE_OUTPUT_CONVERT)])
78@patch('thefuck.specific.archlinux.subprocess')
79@patch.multiple(pacman, create=True, pacman=pacman_cmd)
80def test_get_new_command_mocked(subp_mock, command, new_command, return_value):
81 subp_mock.check_output.return_value = return_value
82 assert get_new_command(command) == new_command
83

After

1import pytest
2from mock import patch
3from thefuck.rules import pacman
4from thefuck.rules.pacman import match, get_new_command
5from thefuck.types import Command
6
7
8pacman_cmd = getattr(pacman, 'pacman', 'pacman')
9
10PKGFILE_OUTPUT_SUDO = 'core/sudo 1.8.13-13/usr/bin/sudo'
11PKGFILE_OUTPUT_CONVERT = 'extra/imagemagick 6.9.1.0-1\t/usr/bin/convert'
…lines 12–16 unchanged (5 lines)
17extra/vim-python3 7.4.712-1 \t/usr/bin/vim'''
18
19
20@pytest.mark.skipif(not getattr(pacman, 'enabled_by_default', True),
21 reason='Skip if pacman is not available')
22@pytest.mark.parametrize('command', [
23 Command('vim', 'vim: command not found'),
24 Command('sudo vim', 'sudo: vim: command not found')])
25def test_match(command):
26 assert match(command)
27
28
29@pytest.mark.parametrize('command, return_value', [
30 (Command('vim', 'vim: command not found'), PKGFILE_OUTPUT_VIM),
31 (Command('sudo vim', 'sudo: vim: command not found'), PKGFILE_OUTPUT_VIM)])
32@patch('thefuck.specific.archlinux.subprocess')
33@patch.multiple(pacman, create=True, pacman=pacman_cmd)
34def test_match_mocked(subp_mock, command, return_value):
35 subp_mock.check_output.return_value = return_value
36 assert match(command)
37
38
39@pytest.mark.parametrize('command', [
40 Command('vim', ''), Command('', ''),
41 Command('sudo vim', ''), Command('', '')])
42def test_not_match(command):
43 assert not match(command)
44
45
46sudo_vim_possibilities = ['{} -S extra/gvim && sudo vim',
47 '{} -S extra/gvim-python3 && sudo vim',
…lines 48–57 unchanged (10 lines)
58vim_possibilities = [s.format(pacman_cmd) for s in vim_possibilities]
59
60
61@pytest.mark.skipif(not getattr(pacman, 'enabled_by_default', True),
62 reason='Skip if pacman is not available')
63@pytest.mark.parametrize('command, new_command', [
64 (Command('vim', ''), vim_possibilities),
65 (Command('sudo vim', ''), sudo_vim_possibilities),
66 (Command('convert', ''), ['{} -S extra/imagemagick && convert'.format(pacman_cmd)]),
67 (Command('sudo convert', ''), ['{} -S extra/imagemagick && sudo convert'.format(pacman_cmd)])])
68def test_get_new_command(command, new_command, mocker):
69 assert get_new_command(command) == new_command
70
71
72@pytest.mark.parametrize('command, new_command, return_value', [
73 (Command('vim', ''), vim_possibilities, PKGFILE_OUTPUT_VIM),
74 (Command('sudo vim', ''), sudo_vim_possibilities, PKGFILE_OUTPUT_VIM),
75 (Command('convert', ''), ['{} -S extra/imagemagick && convert'.format(pacman_cmd)], PKGFILE_OUTPUT_CONVERT),
76 (Command('sudo', ''), ['{} -S core/sudo && sudo'.format(pacman_cmd)], PKGFILE_OUTPUT_SUDO),
77 (Command('sudo convert', ''), ['{} -S extra/imagemagick && sudo convert'.format(pacman_cmd)], PKGFILE_OUTPUT_CONVERT)])
78@patch('thefuck.specific.archlinux.subprocess')
79@patch.multiple(pacman, create=True, pacman=pacman_cmd)
80def test_get_new_command_mocked(subp_mock, command, new_command, return_value):
81 subp_mock.check_output.return_value = return_value
82 assert get_new_command(command) == new_command
83

Before

module
import_statement
import "import"
dotted_name
identifier "pytest"
import_from_statement
from "from"
dotted_name
identifier "mock"
import "import"
dotted_name
identifier "patch"
import_from_statement
from "from"
dotted_name
identifier "thefuck"
. "."
identifier "rules"
import "import"
dotted_name
identifier "pacman"
import_from_statement
from "from"
dotted_name
identifier "thefuck"
. "."
identifier "rules"
. "."
identifier "pacman"
import "import"
dotted_name
identifier "match"
, ","
dotted_name
identifier "get_new_command"
import_from_statement
from "from"
dotted_name
identifier "tests"
. "."
identifier "utils"
import "import"
dotted_name
identifier "Command"
expression_statement
assignment
identifier "pacman_cmd"
= "="
call
identifier "getattr"
argument_list
( "("
identifier "pacman"
, ","
string
string_start "'"
string_content "pacman"
string_end "'"
, ","
string
string_start "'"
string_content "pacman"
string_end "'"
) ")"
expression_statement
assignment
identifier "PKGFILE_OUTPUT_SUDO"
= "="
string
string_start "'"
string_content "core/sudo 1.8.13-13/usr/bin/sudo"
string_end "'"
expression_statement
assignment
identifier "PKGFILE_OUTPUT_CONVERT"
= "="
string
string_start "'"
string_content
escape_sequence "\\t"
string_end "'"
expression_statement
assignment
identifier "PKGFILE_OUTPUT_VIM"
= "="
string
string_start "'''"
string_content
escape_sequence "\\t"
escape_sequence "\\t"
escape_sequence "\\t"
escape_sequence "\\t"
escape_sequence "\\t"
string_end "'''"
decorated_definition
decorator (+36 nodes collapsed)
decorator
@ "@"
call
attribute
attribute
identifier "pytest"
. "."
identifier "mark"
. "."
identifier "parametrize"
argument_list
( "("
string
string_start "'"
string_content "command"
string_end "'"
, ","
list
[ "["
call
identifier "Command"
argument_list
( "("
keyword_argument
identifier "script"
= "="
string
string_start "'"
string_content "vim"
string_end "'"
, ","
keyword_argument
identifier "stderr"
= "="
string
string_start "'"
string_content "vim: command not found"
string_end "'"
) ")"
, ","
call
identifier "Command"
argument_list
( "("
keyword_argument
identifier "script"
= "="
string
string_start "'"
string_content "sudo vim"
string_end "'"
, ","
keyword_argument
identifier "stderr"
= "="
string
string_start "'"
string_content "sudo: vim: command not found"
string_end "'"
) ")"
] "]"
) ")"
function_definition
def "def"
identifier "test_match"
parameters
( "("
identifier "command"
) ")"
: ":"
block
assert_statement
assert "assert"
call
identifier "match"
argument_list
( "("
identifier "command"
) ")"
decorated_definition
decorator
@ "@"
call
attribute
attribute
identifier "pytest"
. "."
identifier "mark"
. "."
identifier "parametrize"
argument_list
( "("
string
string_start "'"
string_content "command, return_value"
string_end "'"
, ","
list
[ "["
tuple
( "("
call
identifier "Command"
argument_list
( "("
keyword_argument
identifier "script"
= "="
string
string_start "'"
string_content "vim"
string_end "'"
, ","
keyword_argument
identifier "stderr"
= "="
string
string_start "'"
string_content "vim: command not found"
string_end "'"
) ")"
, ","
identifier "PKGFILE_OUTPUT_VIM"
) ")"
, ","
tuple
( "("
call
identifier "Command"
argument_list
( "("
keyword_argument
identifier "script"
= "="
string
string_start "'"
string_content "sudo vim"
string_end "'"
, ","
keyword_argument
identifier "stderr"
= "="
string
string_start "'"
string_content "sudo: vim: command not found"
string_end "'"
) ")"
, ","
identifier "PKGFILE_OUTPUT_VIM"
) ")"
] "]"
) ")"
decorator
@ "@"
call
identifier "patch"
argument_list
( "("
string
string_start "'"
string_content "thefuck.specific.archlinux.subprocess"
string_end "'"
) ")"
decorator (+21 nodes collapsed)
function_definition (+32 nodes collapsed)
decorated_definition
decorator
@ "@"
call
attribute
attribute
identifier "pytest"
. "."
identifier "mark"
. "."
identifier "parametrize"
argument_list
( "("
string
string_start "'"
string_content "command"
string_end "'"
, ","
list
[ "["
call
identifier "Command"
argument_list
( "("
keyword_argument
identifier "script"
= "="
string
string_start "'"
string_content "vim"
string_end "'"
, ","
keyword_argument
identifier "stderr"
= "="
string
string_start "'"
string_end "'"
) ")"
, ","
call
identifier "Command"
argument_list
( "("
) ")"
, ","
call
identifier "Command"
argument_list
( "("
keyword_argument
identifier "script"
= "="
string
string_start "'"
string_content "sudo vim"
string_end "'"
, ","
keyword_argument
identifier "stderr"
= "="
string
string_start "'"
string_end "'"
) ")"
, ","
call
identifier "Command"
argument_list
( "("
) ")"
] "]"
) ")"
function_definition
def "def"
identifier "test_not_match"
parameters
( "("
identifier "command"
) ")"
: ":"
block
assert_statement
assert "assert"
not_operator
not "not"
call
identifier "match"
argument_list
( "("
identifier "command"
) ")"
expression_statement (+31 nodes collapsed)
expression_statement (+21 nodes collapsed)
expression_statement (+31 nodes collapsed)
expression_statement (+21 nodes collapsed)
decorated_definition
decorator (+36 nodes collapsed)
decorator
@ "@"
call
attribute
attribute
identifier "pytest"
. "."
identifier "mark"
. "."
identifier "parametrize"
argument_list
( "("
string
string_start "'"
string_content "command, new_command"
string_end "'"
, ","
list
[ "["
tuple
( "("
call
identifier "Command"
argument_list
( "("
string
string_start "'"
string_content "vim"
string_end "'"
) ")"
, ","
identifier "vim_possibilities"
) ")"
, ","
tuple
( "("
call
identifier "Command"
argument_list
( "("
string
string_start "'"
string_content "sudo vim"
string_end "'"
) ")"
, ","
identifier "sudo_vim_possibilities"
) ")"
, ","
tuple
( "("
call
identifier "Command"
argument_list
( "("
string
string_start "'"
string_content "convert"
string_end "'"
) ")"
, ","
list
[ "["
call
attribute
string
string_start "'"
string_content "{} -S extra/imagemagick && convert"
string_end "'"
. "."
identifier "format"
argument_list
( "("
identifier "pacman_cmd"
) ")"
] "]"
) ")"
, ","
tuple
( "("
call
identifier "Command"
argument_list
( "("
string
string_start "'"
string_content "sudo convert"
string_end "'"
) ")"
, ","
list
[ "["
call
attribute
string
string_start "'"
string_content "{} -S extra/imagemagick && sudo convert"
string_end "'"
. "."
identifier "format"
argument_list
( "("
identifier "pacman_cmd"
) ")"
] "]"
) ")"
] "]"
) ")"
function_definition (+24 nodes collapsed)
decorated_definition
decorator
@ "@"
call
attribute
attribute
identifier "pytest"
. "."
identifier "mark"
. "."
identifier "parametrize"
argument_list
( "("
string
string_start "'"
string_content "command, new_command, return_value"
string_end "'"
, ","
list
[ "["
tuple
( "("
call
identifier "Command"
argument_list
( "("
string
string_start "'"
string_content "vim"
string_end "'"
) ")"
, ","
identifier "vim_possibilities"
, ","
identifier "PKGFILE_OUTPUT_VIM"
) ")"
, ","
tuple
( "("
call
identifier "Command"
argument_list
( "("
string
string_start "'"
string_content "sudo vim"
string_end "'"
) ")"
, ","
identifier "sudo_vim_possibilities"
, ","
identifier "PKGFILE_OUTPUT_VIM"
) ")"
, ","
tuple
( "("
call
identifier "Command"
argument_list
( "("
string
string_start "'"
string_content "convert"
string_end "'"
) ")"
, ","
list
[ "["
call
attribute
string
string_start "'"
string_content "{} -S extra/imagemagick && convert"
string_end "'"
. "."
identifier "format"
argument_list
( "("
identifier "pacman_cmd"
) ")"
] "]"
, ","
identifier "PKGFILE_OUTPUT_CONVERT"
) ")"
, ","
tuple
( "("
call
identifier "Command"
argument_list
( "("
string
string_start "'"
string_content "sudo"
string_end "'"
) ")"
, ","
list
[ "["
call
attribute
string
string_start "'"
string_content "{} -S core/sudo && sudo"
string_end "'"
. "."
identifier "format"
argument_list
( "("
identifier "pacman_cmd"
) ")"
] "]"
, ","
identifier "PKGFILE_OUTPUT_SUDO"
) ")"
, ","
tuple
( "("
call
identifier "Command"
argument_list
( "("
string
string_start "'"
string_content "sudo convert"
string_end "'"
) ")"
, ","
list
[ "["
call
attribute
string
string_start "'"
string_content "{} -S extra/imagemagick && sudo convert"
string_end "'"
. "."
identifier "format"
argument_list
( "("
identifier "pacman_cmd"
) ")"
] "]"
, ","
identifier "PKGFILE_OUTPUT_CONVERT"
) ")"
] "]"
) ")"
decorator
@ "@"
call
identifier "patch"
argument_list
( "("
string
string_start "'"
string_content "thefuck.specific.archlinux.subprocess"
string_end "'"
) ")"
decorator (+21 nodes collapsed)
function_definition (+37 nodes collapsed)

After

module
import_statement
import "import"
dotted_name
identifier "pytest"
import_from_statement
from "from"
dotted_name
identifier "mock"
import "import"
dotted_name
identifier "patch"
import_from_statement
from "from"
dotted_name
identifier "thefuck"
. "."
identifier "rules"
import "import"
dotted_name
identifier "pacman"
import_from_statement
from "from"
dotted_name
identifier "thefuck"
. "."
identifier "rules"
. "."
identifier "pacman"
import "import"
dotted_name
identifier "match"
, ","
dotted_name
identifier "get_new_command"
import_from_statement
from "from"
dotted_name
identifier "thefuck"
. "."
identifier "types"
import "import"
dotted_name
identifier "Command"
expression_statement
assignment
identifier "pacman_cmd"
= "="
call
identifier "getattr"
argument_list
( "("
identifier "pacman"
, ","
string
string_start "'"
string_content "pacman"
string_end "'"
, ","
string
string_start "'"
string_content "pacman"
string_end "'"
) ")"
expression_statement
assignment
identifier "PKGFILE_OUTPUT_SUDO"
= "="
string
string_start "'"
string_content "core/sudo 1.8.13-13/usr/bin/sudo"
string_end "'"
expression_statement
assignment
identifier "PKGFILE_OUTPUT_CONVERT"
= "="
string
string_start "'"
string_content
escape_sequence "\\t"
string_end "'"
expression_statement
assignment
identifier "PKGFILE_OUTPUT_VIM"
= "="
string
string_start "'''"
string_content
escape_sequence "\\t"
escape_sequence "\\t"
escape_sequence "\\t"
escape_sequence "\\t"
escape_sequence "\\t"
string_end "'''"
decorated_definition
decorator (+36 nodes collapsed)
decorator
@ "@"
call
attribute
attribute
identifier "pytest"
. "."
identifier "mark"
. "."
identifier "parametrize"
argument_list
( "("
string
string_start "'"
string_content "command"
string_end "'"
, ","
list
[ "["
call
identifier "Command"
argument_list
( "("
string
string_start "'"
string_content "vim"
string_end "'"
, ","
string
string_start "'"
string_content "vim: command not found"
string_end "'"
) ")"
, ","
call
identifier "Command"
argument_list
( "("
string
string_start "'"
string_content "sudo vim"
string_end "'"
, ","
string
string_start "'"
string_content "sudo: vim: command not found"
string_end "'"
) ")"
] "]"
) ")"
function_definition
def "def"
identifier "test_match"
parameters
( "("
identifier "command"
) ")"
: ":"
block
assert_statement
assert "assert"
call
identifier "match"
argument_list
( "("
identifier "command"
) ")"
decorated_definition
decorator
@ "@"
call
attribute
attribute
identifier "pytest"
. "."
identifier "mark"
. "."
identifier "parametrize"
argument_list
( "("
string
string_start "'"
string_content "command, return_value"
string_end "'"
, ","
list
[ "["
tuple
( "("
call
identifier "Command"
argument_list
( "("
string
string_start "'"
string_content "vim"
string_end "'"
, ","
string
string_start "'"
string_content "vim: command not found"
string_end "'"
) ")"
, ","
identifier "PKGFILE_OUTPUT_VIM"
) ")"
, ","
tuple
( "("
call
identifier "Command"
argument_list
( "("
string
string_start "'"
string_content "sudo vim"
string_end "'"
, ","
string
string_start "'"
string_content "sudo: vim: command not found"
string_end "'"
) ")"
, ","
identifier "PKGFILE_OUTPUT_VIM"
) ")"
] "]"
) ")"
decorator
@ "@"
call
identifier "patch"
argument_list
( "("
string
string_start "'"
string_content "thefuck.specific.archlinux.subprocess"
string_end "'"
) ")"
decorator (+21 nodes collapsed)
function_definition (+32 nodes collapsed)
decorated_definition
decorator
@ "@"
call
attribute
attribute
identifier "pytest"
. "."
identifier "mark"
. "."
identifier "parametrize"
argument_list
( "("
string
string_start "'"
string_content "command"
string_end "'"
, ","
list
[ "["
call
identifier "Command"
argument_list
( "("
string
string_start "'"
string_content "vim"
string_end "'"
, ","
string
string_start "'"
string_end "'"
) ")"
, ","
call
identifier "Command"
argument_list
( "("
string
string_start "'"
string_end "'"
, ","
string
string_start "'"
string_end "'"
) ")"
, ","
call
identifier "Command"
argument_list
( "("
string
string_start "'"
string_content "sudo vim"
string_end "'"
, ","
string
string_start "'"
string_end "'"
) ")"
, ","
call
identifier "Command"
argument_list
( "("
string
string_start "'"
string_end "'"
, ","
string
string_start "'"
string_end "'"
) ")"
] "]"
) ")"
function_definition
def "def"
identifier "test_not_match"
parameters
( "("
identifier "command"
) ")"
: ":"
block
assert_statement
assert "assert"
not_operator
not "not"
call
identifier "match"
argument_list
( "("
identifier "command"
) ")"
expression_statement (+31 nodes collapsed)
expression_statement (+21 nodes collapsed)
expression_statement (+31 nodes collapsed)
expression_statement (+21 nodes collapsed)
decorated_definition
decorator (+36 nodes collapsed)
decorator
@ "@"
call
attribute
attribute
identifier "pytest"
. "."
identifier "mark"
. "."
identifier "parametrize"
argument_list
( "("
string
string_start "'"
string_content "command, new_command"
string_end "'"
, ","
list
[ "["
tuple
( "("
call
identifier "Command"
argument_list
( "("
string
string_start "'"
string_content "vim"
string_end "'"
, ","
string
string_start "'"
string_end "'"
) ")"
, ","
identifier "vim_possibilities"
) ")"
, ","
tuple
( "("
call
identifier "Command"
argument_list
( "("
string
string_start "'"
string_content "sudo vim"
string_end "'"
, ","
string
string_start "'"
string_end "'"
) ")"
, ","
identifier "sudo_vim_possibilities"
) ")"
, ","
tuple
( "("
call
identifier "Command"
argument_list
( "("
string
string_start "'"
string_content "convert"
string_end "'"
, ","
string
string_start "'"
string_end "'"
) ")"
, ","
list
[ "["
call
attribute
string
string_start "'"
string_content "{} -S extra/imagemagick && convert"
string_end "'"
. "."
identifier "format"
argument_list
( "("
identifier "pacman_cmd"
) ")"
] "]"
) ")"
, ","
tuple
( "("
call
identifier "Command"
argument_list
( "("
string
string_start "'"
string_content "sudo convert"
string_end "'"
, ","
string
string_start "'"
string_end "'"
) ")"
, ","
list
[ "["
call
attribute
string
string_start "'"
string_content "{} -S extra/imagemagick && sudo convert"
string_end "'"
. "."
identifier "format"
argument_list
( "("
identifier "pacman_cmd"
) ")"
] "]"
) ")"
] "]"
) ")"
function_definition (+24 nodes collapsed)
decorated_definition
decorator
@ "@"
call
attribute
attribute
identifier "pytest"
. "."
identifier "mark"
. "."
identifier "parametrize"
argument_list
( "("
string
string_start "'"
string_content "command, new_command, return_value"
string_end "'"
, ","
list
[ "["
tuple
( "("
call
identifier "Command"
argument_list
( "("
string
string_start "'"
string_content "vim"
string_end "'"
, ","
string
string_start "'"
string_end "'"
) ")"
, ","
identifier "vim_possibilities"
, ","
identifier "PKGFILE_OUTPUT_VIM"
) ")"
, ","
tuple
( "("
call
identifier "Command"
argument_list
( "("
string
string_start "'"
string_content "sudo vim"
string_end "'"
, ","
string
string_start "'"
string_end "'"
) ")"
, ","
identifier "sudo_vim_possibilities"
, ","
identifier "PKGFILE_OUTPUT_VIM"
) ")"
, ","
tuple
( "("
call
identifier "Command"
argument_list
( "("
string
string_start "'"
string_content "convert"
string_end "'"
, ","
string
string_start "'"
string_end "'"
) ")"
, ","
list
[ "["
call
attribute
string
string_start "'"
string_content "{} -S extra/imagemagick && convert"
string_end "'"
. "."
identifier "format"
argument_list
( "("
identifier "pacman_cmd"
) ")"
] "]"
, ","
identifier "PKGFILE_OUTPUT_CONVERT"
) ")"
, ","
tuple
( "("
call
identifier "Command"
argument_list
( "("
string
string_start "'"
string_content "sudo"
string_end "'"
, ","
string
string_start "'"
string_end "'"
) ")"
, ","
list
[ "["
call
attribute
string
string_start "'"
string_content "{} -S core/sudo && sudo"
string_end "'"
. "."
identifier "format"
argument_list
( "("
identifier "pacman_cmd"
) ")"
] "]"
, ","
identifier "PKGFILE_OUTPUT_SUDO"
) ")"
, ","
tuple
( "("
call
identifier "Command"
argument_list
( "("
string
string_start "'"
string_content "sudo convert"
string_end "'"
, ","
string
string_start "'"
string_end "'"
) ")"
, ","
list
[ "["
call
attribute
string
string_start "'"
string_content "{} -S extra/imagemagick && sudo convert"
string_end "'"
. "."
identifier "format"
argument_list
( "("
identifier "pacman_cmd"
) ")"
] "]"
, ","
identifier "PKGFILE_OUTPUT_CONVERT"
) ")"
] "]"
) ")"
decorator
@ "@"
call
identifier "patch"
argument_list
( "("
string
string_start "'"
string_content "thefuck.specific.archlinux.subprocess"
string_end "'"
) ")"
decorator (+21 nodes collapsed)
function_definition (+37 nodes collapsed)