- Remove now-removed configuration values
- Use obvious 'unset' defaults for ``project`` and ``author``
- Prefer 'e.g.' to 'ex.'
- Allow non-list sequence types in various configuration values
- Add types and defaults to every confval directive
We already have a helper function that allows us to convert a filename
to a "docname". Don't reinvent the wheel and simply use this when
building specific files with Sphinx. Note that this does change behavior
slightly, insofar as filenames that don't resolve to valid docnames will
now be ignored rather than being passed with their suffix and silently
ignored later, but that seems sane.
Signed-off-by: Stephen Finucane <stephen@that.guru>
https://github.com/asottile/pyupgrade
> A tool to automatically upgrade syntax for newer versions of the
> language.
- Drop u str prefix
- Drop base object inheritance
- Drop args to super()
- Use set literals
- Use dict comprehension
- Use set comprehension
So far, ``Builder.build_specific()`` accpets filnames without file
extension. On the other hand, ``sphinx-build`` command does not accept
such files. So the special handling code is only working for 3rd party
applications. The behavior is not consistent. In addition, that is not
helpful for users.
This removes such behavior from builders. This does not change Sphinx
application itself. It only effects to the applications which uses the
API directly.
In Python 3, the default encoding of source files is utf-8. The encoding
cookie is now unnecessary and redundant so remove it. For more details,
see the docs:
https://docs.python.org/3/howto/unicode.html#the-string-type
> The default encoding for Python source code is UTF-8, so you can
> simply include a Unicode character in a string literal ...
Includes a fix for the flake8 header checks to stop expecting an
encoding cookie.