Reported by pylint's 'bad-whitespace' warning.
Not gonna enable this warning in the CI check, because it flags stuff
like deliberately aligning assignments and gets too cultish. Just a
cleanup pass.
For whatever reason, the common convention in Python is to skip spaces
around '=' when passing keyword arguments and giving default arguments:
f(x=3, y=4)
def f(x, y=8):
...
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
When sphinx-build is run under Python 2, running e.g. 'make html' in
doc/ currently causes the following error:
Exception occurred:
File "conf.py", line 128, in <module>
from lexer.DtsLexer import DtsLexer
ImportError: No module named lexer.DtsLexer
The problem is that doc/extensions/lexer/ contains no __init__.py file,
which prevents Python 2 from finding submodules in it[1].
The problem does not occur for Python 3, due to implicit namespaces
packages:
https://www.python.org/dev/peps/pep-0420/
Add an empty __init__.py to doc/extensions/lexer/ to fix building when
sphinx-build uses Python 2 (2.7 is still the version recommended on the
Sphinx homepage). This won't alter the behavior for Python 3.
(doc/extensions is added to the search path at the beginning of conf.py
and so doesn't need an __init__.py. doc/extensions/zephyr already has an
empty __init__.py.)
[1] https://docs.python.org/2/tutorial/modules.html#packagesFixes#6851
Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>