Commit Graph

12040 Commits

Author SHA1 Message Date
Takeshi KOMIYA
8cba23b8c1 Fix annotations 2018-12-12 12:44:55 +09:00
Takeshi KOMIYA
7a0e205ebd
Merge pull request #5758 from tk0miya/fix_typehints_for_docfields
Fix annotaions for docfields
2018-12-12 01:49:00 +09:00
Takeshi KOMIYA
4c7143c85a
Merge pull request #5757 from jdufresne/open
Simplify open() call by removing default mode
2018-12-12 01:45:21 +09:00
Takeshi KOMIYA
aebfd0df71
Merge pull request #5743 from jdufresne/path-finder
Define _MockImporter as a MetaPathFinder
2018-12-12 01:36:46 +09:00
Takeshi KOMIYA
141dcb4bdd
Merge pull request #5700 from tk0miya/smart_conf_py
quickstart: Simplify generated conf.py (common items)
2018-12-12 01:34:04 +09:00
Takeshi KOMIYA
db35b28958
Merge pull request #5742 from jdufresne/userstring
Remove _TranslationProxy methods that duplicate UserString
2018-12-12 01:33:42 +09:00
Takeshi KOMIYA
c15721b41f Fix annotaions for docfields 2018-12-12 01:25:47 +09:00
Jon Dufresne
8bb73c9fd3 Simplify open() call by removing default mode
The open() function opens files in read-only text mode by default. Drop
the mode argument to be slightly simpler and more idiomatic.

https://docs.python.org/3/library/functions.html#open

> The default mode is 'r' (open for reading text, synonym of 'rt').
2018-12-11 06:50:20 -08:00
Takeshi KOMIYA
689b9ffd04
Merge pull request #5751 from tk0miya/refactor_autosummary
Refactor Autosummary directive by DocumenterBridge
2018-12-10 23:41:49 +09:00
Takeshi KOMIYA
41ee4cf5f9
Merge pull request #5753 from tk0miya/fix_typehints_for_toctree
Fix annotations for toctree
2018-12-10 23:41:21 +09:00
Takeshi KOMIYA
9fc1e1101b
Merge pull request #5752 from tk0miya/fix_typehints_for_minor
Fix annotations
2018-12-10 23:40:21 +09:00
Takeshi KOMIYA
f48ccd029d Fix annotations 2018-12-10 22:59:47 +09:00
Takeshi KOMIYA
d898da697d Refactor Autosummary directive by DocumenterBridge 2018-12-10 22:36:44 +09:00
Takeshi KOMIYA
fd47f3baf7 Fix annotations for toctree 2018-12-10 11:17:38 +09:00
Takeshi KOMIYA
63af636fd9
Merge pull request #5748 from jdufresne/py27
Remove Python2 exception type in inheritance_diagram.py
2018-12-10 09:48:36 +09:00
Takeshi KOMIYA
366e4674f7
Merge pull request #5741 from jdufresne/xenial
Use 'dist: xenial' in Travis to simplify configuration
2018-12-10 09:47:16 +09:00
Takeshi KOMIYA
5d786d2b84
Merge pull request #5746 from jdufresne/attrdict
Deprecate unused and untested sphinx.util functions
2018-12-10 09:44:13 +09:00
Takeshi KOMIYA
9cb0301f13
Merge pull request #5744 from jdufresne/role-source-info
Correct type signature of set_role_source_info()
2018-12-10 09:40:27 +09:00
Jon Dufresne
a359013e57 Remove Python2 exception type in inheritance_diagram.py 2018-12-09 16:29:31 -08:00
Takeshi KOMIYA
81464948cc
Merge pull request #5740 from tk0miya/fix_typehints_for_TextlikeNode
Add TextlikeNode type for docfields
2018-12-10 09:02:32 +09:00
Jon Dufresne
3a96ce6591 Deprecate unused and untested sphinx.util functions
sphinx.util.attrdict: Last use removed in
b09e628b0f.

sphinx.util.PeekableIterator: Last use removed in
85b8a451a6.
2018-12-09 14:54:50 -08:00
Jon Dufresne
d194fe8f7f Correct type signature of set_role_source_info() 2018-12-09 12:51:10 -08:00
Jon Dufresne
c994f30b25 Define _MockImporter as a MetaPathFinder
The instance is added to sys.meta_path. Per the documentation, this
should be a MetaPathFinder:

https://docs.python.org/3/library/sys.html#sys.meta_path

Correct the _MockImporter.find_module() type signature per typeshed.

0b49ce75b4/stdlib/3/importlib/abc.pyi (L56-L57)
2018-12-09 12:30:56 -08:00
Jon Dufresne
d41b14f20e Remove _TranslationProxy methods that duplicate UserString
The warning in the comment:

> replace function from UserString; it instantiates a self.__class__ for
> the encoding result

Doesn't apply to these methods as they return non text types. Mostly
bool. By removing these methods, there is less to maintain, annotate,
etc.
2018-12-09 12:07:48 -08:00
Jon Dufresne
96f6c950dd Use 'dist: xenial' in Travis to simplify configuration
Allows using Python version 3.7 without sudo declarations.

Travis officially added support for Xenial on 2018-11-08.

https://blog.travis-ci.com/2018-11-08-xenial-release
2018-12-09 09:36:02 -08:00
Takeshi KOMIYA
b13a6ff3e6
Merge pull request #5739 from tk0miya/fix_typehints_for_minor
Fix annotations (some modules)
2018-12-10 01:39:43 +09:00
Takeshi KOMIYA
565422d666 Add TextlikeNode type for docfields 2018-12-10 01:28:22 +09:00
Takeshi KOMIYA
375ab2ac78 Fix annotations 2018-12-10 01:09:45 +09:00
Takeshi KOMIYA
f05eb1e8ec
Merge pull request #5738 from tk0miya/fix_typehints_for_footnotes
Fix annotations for footnotes
2018-12-10 00:25:47 +09:00
Takeshi KOMIYA
400d3a5aa6
Merge pull request #5737 from tk0miya/refactor_rubric_rendering
refactor: special rubric for footnotes
2018-12-10 00:14:21 +09:00
Takeshi KOMIYA
a06ab0f8e9 Fix annotations for footnotes 2018-12-10 00:08:50 +09:00
Takeshi KOMIYA
389f756f88 refactor: special rubric for footnotes 2018-12-10 00:07:25 +09:00
Takeshi KOMIYA
385d6a6572
Merge pull request #5735 from tk0miya/fix_typehints_for_minor
Fix annotations
2018-12-08 23:44:53 +09:00
Takeshi KOMIYA
85d2d6da72
Merge pull request #5736 from tk0miya/mypy-0.650
Fix a mypy violation
2018-12-08 23:43:35 +09:00
Takeshi KOMIYA
2748c52d5e Fix a mypy violation 2018-12-08 19:19:28 +09:00
Takeshi KOMIYA
bc081e44f8 Fix annotations 2018-12-08 15:59:02 +09:00
Takeshi KOMIYA
559c820214
Merge pull request #5733 from tk0miya/fix_typehints_for_minor
Update type annotations
2018-12-08 02:52:09 +09:00
Takeshi KOMIYA
8ef8ace89c Update type annotations 2018-12-08 02:35:28 +09:00
Takeshi KOMIYA
62c7ad65df
Merge pull request #5732 from tk0miya/fix_typehints_for_N_co
Remove N_co type (unused)
2018-12-08 02:12:55 +09:00
Takeshi KOMIYA
018816801e Remove N_co type (unused) 2018-12-08 01:09:13 +09:00
Takeshi KOMIYA
e965d3c947
Merge pull request #5731 from tk0miya/refactor_io4
Refactor `sphinx.io`: Remove unused codes
2018-12-08 01:08:42 +09:00
Takeshi KOMIYA
6e8ff897f7
Merge pull request #5730 from tk0miya/fix_typehints_for_DirectiveOption
Add DirectiveOption type to an entry of Directive.option_spec
2018-12-08 01:06:22 +09:00
Takeshi KOMIYA
ac5cbfc618 Remove SphinxBaseFileInput.decode() because it is not used in py3 2018-12-07 23:24:39 +09:00
Takeshi KOMIYA
534583cfa6 Skip meaningless publisher.set_components() call
"parser" component is already passed on initialization.  So it is
not needed to call `set_components()` method.
2018-12-07 23:24:39 +09:00
Takeshi KOMIYA
02f8d26fd3 Add DirectiveOption type to an entry of Directive.option_spec 2018-12-07 23:23:08 +09:00
Takeshi KOMIYA
4493d7bf07
Merge pull request #5729 from tk0miya/refactor_io
Add UnicodeDecodeErrorHandler as a error_handler for open()
2018-12-07 23:22:15 +09:00
Takeshi KOMIYA
1d2929c806
Merge pull request #5726 from tk0miya/refactor_io2
Process prolog and epilog on RSTParser (instead Input component)
2018-12-07 22:56:50 +09:00
Takeshi KOMIYA
c62b1c1f7a Add UnicodeDecodeErrorHandler as a error_handler for open() 2018-12-07 22:53:12 +09:00
Takeshi KOMIYA
c8ce761a73 deprecate SphinxRSTFileInput 2018-12-05 23:11:16 +09:00
Takeshi KOMIYA
8a6179aa61 Process prolog and epilog on RSTParser (instead Input component) 2018-12-05 23:11:16 +09:00