Skip to content

Commit 53a8662

Browse files
Fix CR Comments
1 parent e6251be commit 53a8662

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

Doc/library/warnings.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,10 @@ but literal strings in the latter two.
248248
# Ignore warnings in "yourmodule.submodule" which contain "generic".
249249
# Note that the '.' in 'message' marks any character and in 'module' it is escaped,
250250
# in order to match a literal dot character.
251+
251252
filterwarnings("ignore", message="generic", module=r"yourmodule\.submodule")
252253
# Ignore warnings in "yourmodule.submodule" which START with "generic".
254+
253255
filterwarnings("ignore", module="yourmodule.*")
254256
# Ignore all warnings in "yourmodule" and its submodules.
255257
# Note that the '.' in 'module' marks any character so is not escaped.
@@ -259,6 +261,7 @@ but literal strings in the latter two.
259261
# (but not those containing it).
260262
# Also note that the '.' in the module part does not need to be escaped
261263
# since it is not a regular expression.
264+
262265
-W "ignore:::yourmodule:"
263266
# Ignore all warnings in "yourmodule", but NOT in its submodules.
264267

Lib/test/test_warnings/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1366,7 +1366,7 @@ def test_single_warning(self):
13661366

13671367
def test_string_literals(self):
13681368
# Ensure message/module are treated as string literals
1369-
rc, stdout, stderr = assert_python_ok("-c",
1369+
_, stdout, stderr = assert_python_ok("-c",
13701370
"import sys, warnings; "
13711371
"sys.stdout.write(warnings.filters[0][1].pattern); "
13721372
"sys.stderr.write(warnings.filters[0][3].pattern)",

0 commit comments

Comments
 (0)