@@ -122,14 +122,29 @@ The rest of this section documents the command line interface of stubtest.
122
122
allowlists. Allowlists can be created with --generate-allowlist. Allowlists
123
123
support regular expressions.
124
124
125
+ The presence of an entry in the allowlist means stubtest will not generate
126
+ any errors for the corresponding definition.
127
+
125
128
..option ::--generate-allowlist
126
129
127
130
Print an allowlist (to stdout) to be used with --allowlist
128
131
132
+ When introducing stubtest to an existing project, this is an easy way to
133
+ silence all existing errors.
134
+
129
135
..option ::--ignore-unused-allowlist
130
136
131
137
Ignore unused allowlist entries
132
138
139
+ By default, stubtest will complain if an allowlist entry is not necessary
140
+ for stubtest to pass successfully.
141
+
142
+ Note if an allowlist entry is a regex that matches the empty string,
143
+ stubtest will never consider it unused. For example, to get
144
+ `--ignore-unused-allowlist ` behaviour for a single allowlist entry like
145
+ ``foo.bar `` you could add an allowlist entry ``(foo\.bar)? ``.
146
+ This can be useful when an error only occurs on a specific platform.
147
+
133
148
..option ::--mypy-config-file FILE
134
149
135
150
Use specified mypy config file to determine mypy plugins and mypy path