'Python Formatter Black - how to modify format of retrieving a dict value

I just set up my VS Code to use Black, the python formatter. The default format puts a dict key on a new line when referencing a value, like this,

my_function_call(
    my_dict[
        "my_key"
    ],
    function_param2=var,
    function_param3=another_var
)

I never write keys on a new line like that when referencing a dictionary. Instead, I would rather set it up on the same line, like so,

my_function_call(
    function_param1=my_dict["my_key"],
    function_param2=var,
    function_param3=another_var
)

Is there a way to save specific modifications like this, or is black a take-what-you-get kind of extension? I haven't found anything in their docs or in a google search mentioning modifications EDIT: Just checked and this is not due to black's default line length. The line of code I'm testing is not longer than default 88 chars.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source