Repository navigation
Conversation
| self.mkpath(self.builder_target_dir) # type: ignore | ||
| self.builder_target_dirs = [ | ||
| (builder, os.path.join(self.build_dir, builder)) | ||
| for builder in self.builder] # type: List[(str, str)] |
There was a problem hiding this comment.
This type annotation is invalid. You should use List[Tuple[str, str]] instead.
https://travis-ci.org/sphinx-doc/sphinx/jobs/205824862#L594
BTW, I think the second element of the tuple is a unicode string.
Certainly builder is raw string, but self.build_dir is a unicode (because we can build docs on path including multibytes). As a result, the joined string becomes a unicode string.
| self.config_dir = self.source_dir | ||
| self.config_dir = abspath(self.config_dir) | ||
|
|
||
| self.ensure_string_list('builder') |
There was a problem hiding this comment.
I'm sorry, but could you add # type: ignore label?
It seems mypy does not know ensure_string_list() unfortunately.
https://travis-ci.org/sphinx-doc/sphinx/jobs/205824862#L593
2c6243c to
581a693
Compare
| self.mkpath(self.builder_target_dir) # type: ignore | ||
| self.builder_target_dirs = [ | ||
| (builder, os.path.join(self.build_dir, builder)) | ||
| for builder in self.builder] # type: List[Tuple[str, str]] |
There was a problem hiding this comment.
Oh, I'm very sorry. I'd forgotten to say you that you need to import Tuple like following:
if False:
# For type annotation
+ from typing import Any, Tuple # NOQA
- from typing import Any # NOQA
There was a problem hiding this comment.
Weird - I'm running this locally (tox -e py36) and it's passing. Sorry about that
There was a problem hiding this comment.
Now type verification is invoked outside of tox: make type-check. style check (flake8) is also. Sorry for confusing
581a693 to
3cd9c93
Compare
At present, the 'builder' option for the setuptools integration only supports a single output format, typically HTML, like so: [build_sphinx] builder = man There is value in being able to specify multiple format, like so: [build_sphinx] builder = html man Make this possible. Signed-off-by: Stephen Finucane <[email protected]>
Like the recently added 'docs' target, this is easier than creating a virtualenv, installing deps and running make. Signed-off-by: Stephen Finucane <[email protected]>
3cd9c93 to
8b500fe
Compare
|
The test was broken, but it was caused by troubles in AWS. |
|
Merged. Thank you for contribution! |
Subject: Support multiple builders in setuptools integration
Feature or Bugfix
Purpose
At present, the 'builder' option for the setuptools integration only
supports a single output format, typically HTML, like so:
There is value in being able to specify multiple format, like so:
Make this possible.
Detail
Relates