Skip to content

Commit b5d337c

Browse files
committed
Fix nitpick ignore regexes; extend until they pass
The nitpick ignore regex list included `pip.*`. Because this is a simple regex match, it matches `piptools...` as well as `pip...`. Fixing the regex to be correctly scoped reveals many nitpick errors inside of piptools, which are suppressed here in order to make it possible to track them down and fix later. In addition to generally fixing the regexes, - `InvalidName` and `NormalizedName`, from within `packaging`, are added to nitpick ignores - the regexes are sorted and organized into sections
1 parent 6a309d9 commit b5d337c

2 files changed

Lines changed: 18 additions & 9 deletions

File tree

changelog.d/+fcb3437a.contrib.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed incorrect nitpick ignore regexes -- by {user}`sirosen`.

docs/conf.py

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,24 @@
9595
]
9696

9797
nitpick_ignore_regex = [
98-
("py:class", "pip.*"),
99-
("py:class", "pathlib.*"),
100-
("py:class", "click.*"),
101-
("py:class", "build.*"),
102-
("py:class", "optparse.*"),
103-
("py:class", "_ImportLibDist"),
104-
("py:class", "PackageMetadata"),
105-
("py:class", "importlib.*"),
98+
# FIXME: broken refs inside of pip-tools itself
99+
# internal names with leading '_', mostly type vars
100+
("py:.*", r"piptools\..*\._\w+"),
101+
# BaseRepository ref is broken?
102+
("py:class", r"piptools\.repositories\.BaseRepository"),
103+
# external libraries
104+
("py:.*", r"click\..*"),
105+
("py:.*", r"pip\..*"),
106+
("py:class", "NormalizedName"),
107+
("py:exc", "InvalidName"),
106108
("py:class", "IndexContent"),
107-
("py:exc", "click.*"),
109+
("py:class", "PackageMetadata"),
110+
("py:class", "_ImportLibDist"),
111+
("py:class", r"build\..*"),
112+
# stdlib
113+
("py:class", r"importlib\..*"),
114+
("py:class", r"optparse\..*"),
115+
("py:class", r"pathlib\..*"),
108116
]
109117

110118
suppress_warnings = [

0 commit comments

Comments
 (0)