Repository: spyder-ide/spyder

Issue:
spyder --defaults raises TypeError
<!--- **PLEASE READ:** When submitting here, please ensure you've completed the following checklist and checked the boxes to confirm. Issue reports without it may be closed. Thanks! --->

### Issue Report Checklist

* [x] Searched the [issues page](https://github.com/spyder-ide/spyder/issues?q=is%3Aissue) for similar reports
* [ ] Read the relevant sections of the [Spyder Troubleshooting Guide](https://github.com/spyder-ide/spyder/wiki/Troubleshooting-Guide-and-FAQ) and followed its advice
* [x] Reproduced the issue after updating with ``conda update spyder`` (or ``pip``, if not using Anaconda)
* [ ] Could not reproduce inside ``jupyter qtconsole`` (if console-related)
* [x] Tried basic troubleshooting (if a bug/error)
    * [x] Restarted Spyder
    * [x] Reset preferences with ``spyder --reset``
    * [x] Reinstalled the latest version of [Anaconda](https://www.anaconda.com/download/)
    * [x] Tried the other applicable steps from the Troubleshooting Guide
* [x] Completed the **Problem Description**, **Steps to Reproduce** and **Version** sections below


## Problem Description

On running spyder with the defaults option it fails to start and raises an error.

### What steps reproduce the problem?

1. conda create -n env spyder>=4
2. conda activate env
3. spyder --defaults

### What is the expected output? What do you see instead?

Expected output is spyder with default settings.

Seen output is traceback.

### Paste Traceback/Error Below (if applicable)
<!--- Copy from error dialog or View > Panes > Internal Console --->

```python-traceback

Traceback (most recent call last):
  File "C:\ProgramData\Miniconda3\Scripts\spyder-script.py", line 10, in <module>
    sys.exit(main())
  File "C:\ProgramData\Miniconda3\lib\site-packages\spyder\app\start.py", line 205, in main
    mainwindow.main()
  File "C:\ProgramData\Miniconda3\lib\site-packages\spyder\app\mainwindow.py", line 3679, in main
    CONF.reset_to_defaults(save=True)
TypeError: reset_to_defaults() got an unexpected keyword argument 'save'

```

## Versions
<!--- You can get this information from Help > About Spyder...
or (if Spyder won't launch) the "conda list" command
from the Anaconda Prompt/Terminal/command line. --->

* Spyder version: spyder                    4.0.1                    py38_0
* Python version: python                    3.8.1                h5fd99cc_1
* Qt version: qt                        5.9.7            vc14h73c81de_0
* PyQt version: pyqt                      5.9.2            py38ha925a31_4
* Operating System name/version: Windows 10 build 19564

```
# packages in environment at C:\ProgramData\Miniconda3\envs\env:
# 
# Name                    Version                   Build  Channel
alabaster                 0.7.12                     py_0
argh                      0.26.2                   py38_0
asn1crypto                1.3.0                    py38_0
astroid                   2.3.3                    py38_0
atomicwrites              1.3.0                      py_0
attrs                     19.3.0                     py_0
autopep8                  1.4.4                      py_0
babel                     2.8.0                      py_0
backcall                  0.1.0                    py38_0
bcrypt                    3.1.7            py38he774522_0
bleach                    3.1.0                      py_0
ca-certificates           2020.1.1                      0
certifi                   2019.11.28               py38_0
cffi                      1.14.0           py38h7a1dbc1_0
chardet                   3.0.4                 py38_1003
cloudpickle               1.3.0                      py_0
colorama                  0.4.3                      py_0
cryptography              2.8              py38h7a1dbc1_0
decorator                 4.4.1                      py_0
defusedxml                0.6.0                      py_0
diff-match-patch          20181111                   py_0
docutils                  0.16                     py38_0
entrypoints               0.3                      py38_0
flake8                    3.7.9                    py38_0
future                    0.18.2                   py38_0
icu                       58.2                 ha66f8fd_1
idna                      2.8                   py38_1000
imagesize                 1.2.0                      py_0
importlib_metadata        1.5.0                    py38_0
intervaltree              3.0.2                      py_0
ipykernel                 5.1.4            py38h39e3cac_0
ipython                   7.12.0           py38h5ca1d4c_0
ipython_genutils          0.2.0                    py38_0
isort                     4.3.21                   py38_0
jedi                      0.14.1                   py38_0
jinja2                    2.11.1                     py_0
jpeg                      9b                   hb83a4c4_2
jsonschema                3.2.0                    py38_0
jupyter_client            5.3.4                    py38_0
jupyter_core              4.6.1                    py38_0
keyring                   21.1.0                   py38_0
lazy-object-proxy         1.4.3            py38he774522_0
libpng                    1.6.37               h2a8f88b_0
libsodium                 1.0.16               h9d3ae62_0
libspatialindex           1.9.3                h33f27b4_0
markupsafe                1.1.1            py38he774522_0
mccabe                    0.6.1                    py38_1
mistune                   0.8.4           py38he774522_1000
nbconvert                 5.6.1                    py38_0
nbformat                  5.0.4                      py_0
numpydoc                  0.9.2                      py_0
openssl                   1.1.1d               he774522_4
packaging                 20.1                       py_0
pandoc                    2.2.3.2                       0
pandocfilters             1.4.2                    py38_1
paramiko                  2.6.0                    py38_0
parso                     0.5.2                      py_0
pathtools                 0.1.2                      py_1
pexpect                   4.8.0                    py38_0
pickleshare               0.7.5                 py38_1000
pip                       20.0.2                   py38_1
pluggy                    0.13.1                   py38_0
prompt_toolkit            3.0.3                      py_0
psutil                    5.6.7            py38he774522_0
pycodestyle               2.5.0                    py38_0
pycparser                 2.19                       py_0
pydocstyle                4.0.1                      py_0
pyflakes                  2.1.1                    py38_0
pygments                  2.5.2                      py_0
pylint                    2.4.4                    py38_0
pynacl                    1.3.0            py38h62dcd97_0
pyopenssl                 19.1.0                   py38_0
pyparsing                 2.4.6                      py_0
pyqt                      5.9.2            py38ha925a31_4
pyrsistent                0.15.7           py38he774522_0
pysocks                   1.7.1                    py38_0
python                    3.8.1                h5fd99cc_1
python-dateutil           2.8.1                      py_0
python-jsonrpc-server     0.3.4                      py_0
python-language-server    0.31.7                   py38_0
pytz                      2019.3                     py_0
pywin32                   227              py38he774522_1
pywin32-ctypes            0.2.0                 py38_1000
pyyaml                    5.3              py38he774522_0
pyzmq                     18.1.1           py38ha925a31_0
qdarkstyle                2.8                        py_0
qt                        5.9.7            vc14h73c81de_0
qtawesome                 0.6.1                      py_0
qtconsole                 4.6.0                      py_1
qtpy                      1.9.0                      py_0
requests                  2.22.0                   py38_1
rope                      0.16.0                     py_0
rtree                     0.9.3            py38h21ff451_0
setuptools                45.2.0                   py38_0
sip                       4.19.13          py38ha925a31_0
six                       1.14.0                   py38_0
snowballstemmer           2.0.0                      py_0
sortedcontainers          2.1.0                    py38_0
sphinx                    2.4.0                      py_0
sphinxcontrib-applehelp   1.0.1                      py_0
sphinxcontrib-devhelp     1.0.1                      py_0
sphinxcontrib-htmlhelp    1.0.2                      py_0
sphinxcontrib-jsmath      1.0.1                      py_0
sphinxcontrib-qthelp      1.0.2                      py_0
sphinxcontrib-serializinghtml 1.1.3                      py_0
spyder                    4.0.1                    py38_0
spyder-kernels            1.8.1                    py38_0
sqlite                    3.31.1               he774522_0
testpath                  0.4.4                      py_0
tornado                   6.0.3            py38he774522_3
traitlets                 4.3.3                    py38_0
ujson                     1.35             py38he774522_0
urllib3                   1.25.8                   py38_0
vc                        14.1                 h0510ff6_4
vs2015_runtime            14.16.27012          hf0eaf9b_1
watchdog                  0.10.2                   py38_0
wcwidth                   0.1.8                      py_0
webencodings              0.5.1                    py38_1
wheel                     0.34.2                   py38_0
win_inet_pton             1.1.0                    py38_0
wincertstore              0.2                      py38_0
wrapt                     1.11.2           py38he774522_0
yaml                      0.1.7                hc54c509_2
yapf                      0.28.0                     py_0
zeromq                    4.3.1                h33f27b4_3
zipp                      2.2.0                      py_0
zlib                      1.2.11               h62dcd97_3
```

### Dependencies
<!--- Please go to the menu entry Help > Dependencies,
press the Copy to clipboard button and paste below --->

```
atomicwrites >=1.2.0         :  1.3.0 (OK)
chardet >=2.0.0              :  3.0.4 (OK)
cloudpickle >=0.5.0          :  1.3.0 (OK)
diff_match_patch >=20181111  :  20181111 (OK)
intervaltree                 :  None (OK)
IPython >=4.0                :  7.12.0 (OK)
jedi =0.14.1                 :  0.14.1 (OK)
nbconvert >=4.0              :  5.6.1 (OK)
numpydoc >=0.6.0             :  0.9.2 (OK)
pexpect >=4.4.0              :  4.8.0 (OK)
pickleshare >=0.4            :  0.7.5 (OK)
psutil >=0.3                 :  5.6.7 (OK)
pygments >=2.0               :  2.5.2 (OK)
pylint >=0.25                :  2.4.4 (OK)
pyls >=0.31.2;<0.32.0        :  0.31.7 (OK)
zmq >=17                     :  18.1.1 (OK)
qdarkstyle >=2.7             :  2.8 (OK)
qtawesome >=0.5.7            :  0.6.1 (OK)
qtconsole >=4.6.0            :  4.6.0 (OK)
qtpy >=1.5.0                 :  1.9.0 (OK)
rtree >=0.8.3                :  0.9.3 (OK)
sphinx >=0.6.6               :  2.4.0 (OK)
spyder_kernels >=1.8.1;<2.0.0:  1.8.1 (OK)
watchdog                     :  None (OK)
cython >=0.21                :  None (NOK)
matplotlib >=2.0.0           :  None (NOK)
numpy >=1.7                  :  None (NOK)
pandas >=0.13.1              :  None (NOK)
scipy >=0.17.0               :  None (NOK)
sympy >=0.7.3                :  None (NOK)

```



Discussion:
@steff456, please take a look at this one. The fix shouldn't be hard.

Resolving patch:
diff --git a/spyder/app/mainwindow.py b/spyder/app/mainwindow.py
--- a/spyder/app/mainwindow.py
+++ b/spyder/app/mainwindow.py
@@ -3747,7 +3747,7 @@ def main():
         return
     elif options.reset_to_defaults:
         # Reset Spyder settings to defaults
-        CONF.reset_to_defaults(save=True)
+        CONF.reset_to_defaults()
         return
     elif options.optimize:
         # Optimize the whole Spyder's source code directory


Test patch: