We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
nitpick_ignore[_regex]
list
1 parent 60d8fa1 commit d2aa91fCopy full SHA for d2aa91f
CHANGES
@@ -16,6 +16,9 @@ Features added
16
Bugs fixed
17
----------
18
19
+* #11355: Revert the default type of :confval:`nitpick_ignore` and
20
+ :confval:`nitpick_ignore_regex` to ``list``.
21
+
22
Testing
23
--------
24
sphinx/config.py
@@ -132,8 +132,8 @@ class Config:
132
'needs_extensions': ({}, None, []),
133
'manpages_url': (None, 'env', []),
134
'nitpicky': (False, None, []),
135
- 'nitpick_ignore': (set(), None, [set, list, tuple]),
136
- 'nitpick_ignore_regex': (set(), None, [set, list, tuple]),
+ 'nitpick_ignore': ([], None, [set, list, tuple]),
+ 'nitpick_ignore_regex': ([], None, [set, list, tuple]),
137
'numfig': (False, 'env', []),
138
'numfig_secnum_depth': (1, 'env', []),
139
'numfig_format': ({}, 'env', []), # will be initialized in init_numfig_format()
tests/test_config.py
@@ -427,3 +427,18 @@ def test_conf_py_no_language(tempdir):
427
428
# Then the language is coerced to English
429
assert cfg.language == "en"
430
431
432
+def test_conf_py_nitpick_ignore_list(tempdir):
433
+ """Regression test for #11355."""
434
435
+ # Given a conf.py file with no language attribute
436
+ (tempdir / 'conf.py').write_text("", encoding='utf-8')
437
438
+ # When we load conf.py into a Config object
439
+ cfg = Config.read(tempdir, {}, None)
440
+ cfg.init_values()
441
442
+ # Then the default nitpick_ignore[_regex] is an empty list
443
+ assert cfg.nitpick_ignore == []
444
+ assert cfg.nitpick_ignore_regex == []
0 commit comments