diff options
author | Calum Lind <calumlind@gmail.com> | 2018-10-02 15:39:51 +0100 |
---|---|---|
committer | Calum Lind <calumlind@gmail.com> | 2018-10-03 15:21:53 +0100 |
commit | b1cdc32f7357e9777eb6cc2d90094c7d122af2eb (patch) | |
tree | 9106ac399a7df178c8dbed6fe58009d36b18159a /docs | |
parent | bcca07443ccad7f130444baaac52b7b49478905e (diff) | |
download | deluge-b1cdc32f7357e9777eb6cc2d90094c7d122af2eb.tar.gz deluge-b1cdc32f7357e9777eb6cc2d90094c7d122af2eb.tar.bz2 deluge-b1cdc32f7357e9777eb6cc2d90094c7d122af2eb.zip |
[Lint] Use Black to auto-format code
The move to using auto-formatter makes it easier to read, submit and
speeds up development time. https://github.com/ambv/black/
Although I would prefer 79 chars, the default line length of 88 chars
used by black suffices. The flake8 line length remains at 120 chars
since black does not touch comments or docstrings and this will require
another round of fixes.
The only black setting that is not standard is the use of double-quotes
for strings so disabled any formatting of these. Note however that
flake8 will still flag usage of double-quotes. I may change my mind on
double vs single quotes but for now leave them.
A new pyproject.toml file has been created for black configuration.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/source/conf.py | 35 |
1 files changed, 27 insertions, 8 deletions
diff --git a/docs/source/conf.py b/docs/source/conf.py index bed14d95c..76f4a0fbc 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -29,7 +29,13 @@ __builtin__.__dict__['_n'] = lambda s, p, n: s if n == 1 else p # If your extensions are in another directory, add it here. If the directory # is relative to the documentation root, use os.path.abspath to make it # absolute, like shown here. -sys.path.append(os.path.abspath(os.path.join(os.path.join(os.path.dirname(__file__), os.path.pardir), os.path.pardir))) +sys.path.append( + os.path.abspath( + os.path.join( + os.path.join(os.path.dirname(__file__), os.path.pardir), os.path.pardir + ) + ) +) class Mock(object): @@ -58,11 +64,25 @@ class Mock(object): MOCK_MODULES = [ - 'deluge.ui.gtkui.gtkui', 'deluge._libtorrent', - 'libtorrent', 'psyco', - 'pygtk', 'gtk', 'gobject', 'gtk.gdk', 'pango', 'cairo', 'pangocairo', - 'curses', 'win32api', 'win32file', 'win32process', 'win32pipe', - 'pywintypes', 'win32con', 'win32event', + 'deluge.ui.gtkui.gtkui', + 'deluge._libtorrent', + 'libtorrent', + 'psyco', + 'pygtk', + 'gtk', + 'gobject', + 'gtk.gdk', + 'pango', + 'cairo', + 'pangocairo', + 'curses', + 'win32api', + 'win32file', + 'win32process', + 'win32pipe', + 'pywintypes', + 'win32con', + 'win32event', ] for mod_name in MOCK_MODULES: @@ -218,8 +238,7 @@ htmlhelp_basename = 'delugedoc' # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, document class [howto/manual]). latex_documents = [ - ('index', 'deluge.tex', 'deluge Documentation', - 'Deluge Team', 'manual'), + ('index', 'deluge.tex', 'deluge Documentation', 'Deluge Team', 'manual') ] # The name of an image file (relative to this directory) to place at the top of |