[settings] Code style improvements here and there

Code improvements here and there on the settings.py

```python
>>> from timeit import timeit


>>> timeit("""a = b = c = d = e = f = g = 1""")
0.10200189590454102

>>> timeit("""a = 1
... b = 1
... c = 1
... d = 1
... e = 1
... f = 1
... g = 1""")
0.16801916885375977


>>> timeit("[a for a in list('abcdefg')]")
1.217935037612915

>>> timeit("[a for a in tuple('abcdefg')]")
0.9054270057678223
```

The rest is just PEP8 fixes  
:)