Lewis Haley
f196a92055
autodoc: add 'exclude-members' to user global options
...
As the previous commit explains, it is now possible to specify arguments
to the global options in config files. This means that we can now include
the `exclude-members` option in this global configuration.
Previously, there was no point including this option because it makes no
sense without arguments. Including this option means users have the
flexibility of explicitly including which special methods they want using
(e.g.):
:special-members: __init__, __iter__
or explicitly excluding which special-members (or other members) they want
using (e.g.):
:exclude-members: __weakref__, __hash__
2018-08-17 16:02:11 +01:00
Lewis Haley
6e1e35c98a
autodoc: allow specifying values to global arguments
...
Previously, users could specify a *list* of flags in their config files.
The flags were directive names that would otherwise be present in the
.rst files. However, as a list, it was not possible to specify values
to those flags, which *is* possible in .rst files.
For example, in .rst you could say
:special-members: __init__, __iter__
And this would cause autodoc to generate documents for these methods that
it would otherwise ignore.
This commit changes the config option to instead accept a dictionary.
This is a dictionary whose keys can contain the same flag-names as before,
but whose values can contain the arguments as seen in .rst files.
The old list is still supported, for backwards compatibility, but the data
is transformed into a dictionary when the user's config is loaded.
2018-08-17 15:51:00 +01:00
Lewis Haley
87029392fd
test_autodoc: fix mutable function default argument in do_autodoc
...
Setting mutable types as default arguments is bad practice because the
value is only initialised once. This means that defaults arguments of
lists and dictionaries which are modified during code execution *stay*
modified between calls.
In this case, the `options` dictionary accumulated options as more and
more test cases were executed. Without this change, the tests added in
the next commit do not pass.
See: https://stackoverflow.com/questions/1132941/least-astonishment-and-the-mutable-default-argument
2018-08-17 15:33:58 +01:00
Takeshi KOMIYA
a22f9df684
Fix #5294 : sphinx-quickstart blank prompts in PowerShell
2018-08-17 22:25:13 +09:00
Takeshi KOMIYA
e623739eff
Merge pull request #5309 from tk0miya/5306_NameError_for_invalid_typehints
...
Fix #5306 : autodoc: ``getargspec()`` raises NameError for invalid typehints
2018-08-17 22:10:56 +09:00
Jakob Lykke Andersen
9cddc344db
Merge pull request #5311 from jakobandersen/cpp_new_delete_expr
...
C++, add parsing of new and delete expressions
2018-08-17 14:33:06 +02:00
Takeshi KOMIYA
2fb786cbb6
Merge pull request #5310 from tonyroberts/master
...
Add PyXLL to EXAMPLES
2018-08-17 21:06:25 +09:00
Jakob Lykke Andersen
73ae1ac834
C++, add parsing of basic new expressions.
2018-08-17 13:49:44 +02:00
Tony Roberts
d299869313
Add PyXLL to EXAMPLES
2018-08-17 12:43:24 +01:00
Takeshi KOMIYA
7975d73a17
Fix #5306 : autodoc: emit a warning for invalid typehints
2018-08-17 10:39:02 +09:00
Takeshi KOMIYA
a450eb7a7a
Fix #5306 : autodoc: `getargspec()
` raises NameError for invalid typehints
2018-08-17 10:32:58 +09:00
Timotheus Kampik
3834c6a3b7
Merge pull request #5295 from TimKam/update-karma-dependency
...
Update karma dependency for JS tests
2018-08-16 21:18:41 +02:00
Takeshi KOMIYA
2604920232
Merge pull request #5305 from tk0miya/5211_autodoc_for_partial_functions
...
Fix #5211 : autodoc: No docs generated for functools.partial functions
2018-08-17 02:06:20 +09:00
Takeshi KOMIYA
c4fa1aed34
Fix #5211 : autodoc: No docs generated for functools.partial functions
2018-08-17 01:24:19 +09:00
Takeshi KOMIYA
11331c5923
Merge branch '1.7'
2018-08-17 00:56:35 +09:00
Takeshi KOMIYA
b926ee8aeb
Merge pull request #5304 from tk0miya/5298_imgmath_two_numbers
...
Fix #5298 : imgmath: math_number_all causes equations to have two numbers in html
2018-08-17 00:45:18 +09:00
Takeshi KOMIYA
c8e695fe2c
Update CHANGES for PR #5273
2018-08-17 00:34:31 +09:00
Takeshi KOMIYA
28131df93e
Merge pull request #5307 from akaihola/5273_doctest_conditional_skip
...
Feature: skip doctests conditionally
2018-08-17 00:33:29 +09:00
Takeshi KOMIYA
4b3fc81122
Merge branch '1.7' into 5298_imgmath_two_numbers
2018-08-17 00:08:54 +09:00
Takeshi KOMIYA
01f4d3ba23
Merge pull request #5303 from tk0miya/5291_autodoc_crashed_by_ForwardRef
...
Fix #5291 : autodoc crashed by ForwardRef types
2018-08-17 00:07:14 +09:00
Antti Kaihola
098f37fddf
Ref #5273 : doctest: add test for skipif calling global setup/cleanup
...
Ensure that `doctest_global_setup` and `doctest_global_cleanup` are executed
before and after evaluating each `:skipif:` option.
2018-08-16 17:56:29 +03:00
Antti Kaihola
d52488f028
Ref #5273 : doctest: added a missing type hint
2018-08-16 14:56:53 +03:00
Antti Kaihola
5ffc924940
Ref #5273 : doctest: added a missing final newline
2018-08-16 14:09:06 +03:00
Antti Kaihola
43d5810083
Ref #5273 : doctest: add documentation for the :skipif: option
2018-08-16 14:01:57 +03:00
Antti Kaihola
9185c2c356
Ref #5273 : doctest: add tests for the :skipif: option
2018-08-16 13:22:59 +03:00
Takeshi KOMIYA
1668f007c2
Fix #5298 : imgmath: math_number_all causes equations to have two numbers in html
2018-08-15 22:29:29 +09:00
Takeshi KOMIYA
91650d89c9
Fix #5291 : autodoc crashed by ForwardRef types
2018-08-15 21:30:49 +09:00
Takeshi KOMIYA
8d0170ecf1
Merge pull request #5300 from tk0miya/fix_autodoc_optional
...
Fix autodoc optional
2018-08-15 21:30:22 +09:00
Jakob Lykke Andersen
6433e08069
C++, add parsing of delete expressions.
2018-08-15 10:08:31 +02:00
Takeshi KOMIYA
cc3de81deb
Fix mypy annotations
2018-08-15 11:39:54 +09:00
Takeshi KOMIYA
955c3d388b
test Signature annotations in py34 too
2018-08-15 01:22:52 +09:00
Takeshi KOMIYA
5a0f0bdc61
refactor: format_annotation()
2018-08-15 01:22:52 +09:00
Takeshi KOMIYA
e26dc81272
Fix autodoc: Optional types are wrongly rendered
2018-08-15 01:22:52 +09:00
Takeshi KOMIYA
bce956d357
Merge pull request #5264 from tk0miya/mendex_for_windows
...
latex: Invoke mendex from perl (for Windows)
2018-08-14 22:48:35 +09:00
Timotheus Kampik
e622c11185
Merge pull request #5299 from KengoTODA/add-example
...
add a new book "SpotBugs manual" to EXAMPLES
2018-08-14 10:50:38 +02:00
Kengo TODA
0680805cc3
add a new book "SpotBugs manual" to EXAMPLES
2018-08-14 14:30:22 +08:00
Ashley Whetter
97164faec3
Plugins can resolve imported members for viewcode
2018-08-13 17:07:50 -07:00
Timotheus Kampik
1878a52837
Update karma dependency for JS tests
2018-08-13 23:18:42 +02:00
Takeshi KOMIYA
f77216c5a6
Merge pull request #5261 from tk0miya/5246_singlehtml_sidebars
...
Fix #5246 : Add :confval:`singlehtml_sidebars` to configure sidebars for singlehtml
2018-08-14 00:59:55 +09:00
Takeshi KOMIYA
e5c5d37301
Merge pull request #5283 from cclauss/patch-1
...
Appveyor: Test in Python 3.7 instead of Python 3.6
2018-08-13 22:06:23 +09:00
Timotheus Kampik
3fee3648a8
Merge pull request #5292 from vividtone/add-redmine-primer-book-to-examples
...
Add "Redmine Primer" to EXAMPLES
2018-08-13 14:56:00 +02:00
Takeshi KOMIYA
caf57bcc89
Update CHANGES for PR #5280
2018-08-13 21:41:17 +09:00
Takeshi KOMIYA
3e82d09e7e
Merge pull request #5280 from terencehonles/prefer-typing.get_type_hints
...
change format_args to prefer annotations from typing.get_type_hints
2018-08-13 21:20:09 +09:00
Takeshi KOMIYA
ba97fd4f8d
latex: Invoke mendex from perl (for Windows)
2018-08-13 21:16:17 +09:00
Takeshi KOMIYA
718206b19f
Merge pull request #5267 from tk0miya/4911_make_latexpdf_on_windows
...
Fix #4911 : Allow make latexpdf on Windows
2018-08-13 21:15:26 +09:00
MAEDA Go
07ba03650b
Add "Redmine Primer" to EXAMPLES
2018-08-13 21:14:56 +09:00
Takeshi KOMIYA
f670a33f5b
Fix #5246 : Add :confval:singlehtml_sidebars
to configure sidebars for singlehtml
2018-08-13 11:04:45 +09:00
Takeshi KOMIYA
b135e7ce4a
Merge pull request #5275 from tk0miya/refactor_latex3
...
refactor: Move settings for pLaTeX to ADDITIONAL_SETTINGS
2018-08-13 10:46:07 +09:00
Takeshi KOMIYA
9fc753cf64
latex: Set empty string to $LATEXOPTS
2018-08-13 10:41:10 +09:00
Takeshi KOMIYA
2552efea25
Fix #4911 : Allow make latexpdf on Windows
2018-08-13 10:41:10 +09:00