Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
forked frompython/mypy

Commitaf8b6dd

Browse files
committed
stubtest: improve allowlist documentation
Could help with e.g.matplotlib/matplotlib#24976
1 parentbf82b76 commitaf8b6dd

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

‎docs/source/stubtest.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff 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+
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+
133148
..option::--mypy-config-fileFILE
134149

135150
Use specified mypy config file to determine mypy plugins and mypy path

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp