Search code examples
pythonmacoseditorspyder

How to disable bracket autocomplete in Spyder?


How do you turn off the bracket autocomplete feature in Spyder? I'm using Spyder 4.0.1 on OS X Mojave.

Consider the following Python dictionary:

data_desired = {'Year': [],
'Number of tropical storms': [],
'Number of hurricanes': [],
'Number of Major Hurricanes': [],
'Deaths': [],
'Damage': []}

Writing this out in Spyder, I often get:

data_desired = {'Year': []],

and need to go back and fix the extra bracket.

Regardless of whether the autocomplete feature works well or not, auto-bracketing does not help me because I have to right arrow past the newly generated bracket anyway, which slows down typing.


Solution

  • Use Tools >> Preferences >> Editor >> Advanced Settings >> Untick "Automatic insertion of parentheses, braces and brackets" Then Apply >> OK.

    enter image description here

    Update: Spyder 5.x

    This option was moved to Tools >> Preferences >> Editor >> Source Code >> Untick "Automatic insertion of parentheses, braces and brackets" Then Apply >> OK.

    enter image description here