File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -122,14 +122,29 @@ The rest of this section documents the command line interface of stubtest.
122122 allowlists. Allowlists can be created with --generate-allowlist. Allowlists
123123 support regular expressions.
124124
125+ The presence of an entry in the allowlist means stubtest will not generate
126+ any errors for the corresponding definition.
127+
125128.. option :: --generate-allowlist
126129
127130 Print an allowlist (to stdout) to be used with --allowlist
128131
132+ When introducing stubtest to an existing project, this is an easy way to
133+ silence all existing errors.
134+
129135.. option :: --ignore-unused-allowlist
130136
131137 Ignore unused allowlist entries
132138
139+ Without this option enabled, the default is for stubtest to complain if an
140+ allowlist entry is not necessary 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+
133148.. option :: --mypy-config-file FILE
134149
135150 Use specified mypy config file to determine mypy plugins and mypy path
You can’t perform that action at this time.
0 commit comments