diff options
author | Jon Dufresne <jon.dufresne@gmail.com> | 2018-11-13 18:43:24 -0800 |
---|---|---|
committer | Jon Dufresne <jon.dufresne@gmail.com> | 2018-11-13 18:44:16 -0800 |
commit | 1ae049b2ee257b0748abb0e2bcaef864622f0c82 (patch) | |
tree | d6e17a61f3b7bdc74c5fcf6463ade13b94397358 /sphinx/ext/apidoc.py | |
parent | 45ad2e41a56a7fad0d9c3e8c32c54949c96bfa25 (diff) | |
download | sphinx-git-1ae049b2ee257b0748abb0e2bcaef864622f0c82.tar.gz |
Always prefer dict literals over calls to dict()
Dict literals are always slightly faster and are idiomatic modern
Python.
Diffstat (limited to 'sphinx/ext/apidoc.py')
-rw-r--r-- | sphinx/ext/apidoc.py | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/sphinx/ext/apidoc.py b/sphinx/ext/apidoc.py index 36073298f..7c407e933 100644 --- a/sphinx/ext/apidoc.py +++ b/sphinx/ext/apidoc.py @@ -417,28 +417,28 @@ def main(argv=sys.argv[1:]): continue prev_module = module text += ' %s\n' % module - d = dict( - path = args.destdir, - sep = False, - dot = '_', - project = args.header, - author = args.author or 'Author', - version = args.version or '', - release = args.release or args.version or '', - suffix = '.' + args.suffix, - master = 'index', - epub = True, - extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode', - 'sphinx.ext.todo'], - makefile = True, - batchfile = True, - make_mode = True, - mastertocmaxdepth = args.maxdepth, - mastertoctree = text, - language = 'en', - module_path = rootpath, - append_syspath = args.append_syspath, - ) + d = { + 'path': args.destdir, + 'sep': False, + 'dot': '_', + 'project': args.header, + 'author': args.author or 'Author', + 'version': args.version or '', + 'release': args.release or args.version or '', + 'suffix': '.' + args.suffix, + 'master': 'index', + 'epub': True, + 'extensions': ['sphinx.ext.autodoc', 'sphinx.ext.viewcode', + 'sphinx.ext.todo'], + 'makefile': True, + 'batchfile': True, + 'make_mode': True, + 'mastertocmaxdepth': args.maxdepth, + 'mastertoctree': text, + 'language': 'en', + 'module_path': rootpath, + 'append_syspath': args.append_syspath, + } if args.extensions: d['extensions'].extend(args.extensions) |