mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
merge with stable
This commit is contained in:
commit
dd73c32892
3
CHANGES
3
CHANGES
@ -96,6 +96,9 @@ Bugs fixed
|
||||
* #1017: Be helpful and tell the user when the argument to :rst:dir:`option`
|
||||
does not match the required format.
|
||||
|
||||
* #1345: Fix two bugs with :confval:`nitpick_ignore`; now you don't have to
|
||||
remove the store environment for changes to have effect.
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
|
@ -236,7 +236,8 @@ General configuration
|
||||
|
||||
A list of ``(type, target)`` tuples (by default empty) that should be ignored
|
||||
when generating warnings in "nitpicky mode". Note that ``type`` should
|
||||
include the domain name. An example entry would be ``('py:func', 'int')``.
|
||||
include the domain name if present. Example entries would be ``('py:func',
|
||||
'int')`` or ``('envvar', 'LD_LIBRARY_PATH')``.
|
||||
|
||||
.. versionadded:: 1.1
|
||||
|
||||
|
@ -149,7 +149,8 @@ The :program:`sphinx-build` script has several options:
|
||||
.. option:: -n
|
||||
|
||||
Run in nit-picky mode. Currently, this generates warnings for all missing
|
||||
references.
|
||||
references. See the config value :confval:`nitpick_ignore` for a way to
|
||||
exclude some references as "known missing".
|
||||
|
||||
.. option:: -N
|
||||
|
||||
|
@ -72,7 +72,7 @@ class Config(object):
|
||||
primary_domain = ('py', 'env'),
|
||||
needs_sphinx = (None, None),
|
||||
nitpicky = (False, 'env'),
|
||||
nitpick_ignore = ([], 'env'),
|
||||
nitpick_ignore = ([], 'html'),
|
||||
|
||||
# HTML options
|
||||
html_theme = ('default', 'html'),
|
||||
|
@ -177,9 +177,6 @@ class BuildEnvironment:
|
||||
# this is to invalidate old pickles
|
||||
self.version = ENV_VERSION
|
||||
|
||||
# make this a set for faster testing
|
||||
self._nitpick_ignore = set(self.config.nitpick_ignore)
|
||||
|
||||
# All "docnames" here are /-separated and relative and exclude
|
||||
# the source suffix.
|
||||
|
||||
@ -440,6 +437,9 @@ class BuildEnvironment:
|
||||
self.find_files(config)
|
||||
self.config = config
|
||||
|
||||
# this cache also needs to be updated every time
|
||||
self._nitpick_ignore = set(self.config.nitpick_ignore)
|
||||
|
||||
added, changed, removed = self.get_outdated_files(config_changed)
|
||||
|
||||
# allow user intervention as well
|
||||
@ -1385,6 +1385,9 @@ class BuildEnvironment:
|
||||
dtype = domain and '%s:%s' % (domain.name, typ) or typ
|
||||
if (dtype, target) in self._nitpick_ignore:
|
||||
warn = False
|
||||
# for "std" types also try without domain name
|
||||
if domain.name == 'std' and (typ, target) in self._nitpick_ignore:
|
||||
warn = False
|
||||
if not warn:
|
||||
return
|
||||
if domain and typ in domain.dangling_warnings:
|
||||
|
Loading…
Reference in New Issue
Block a user