Skip to content

Commit fbe6624

Browse files
authored
Fix some typos, remove redundant words and escapes (#8564)
* doc: Fix typos, remove double words * Remove redundant escapes in regex
1 parent 9078c3c commit fbe6624

File tree

7 files changed

+17
-18
lines changed

7 files changed

+17
-18
lines changed

doc/en/changelog.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5097,7 +5097,7 @@ Improved Documentation
50975097

50985098
- In one of the simple examples, use ``pytest_collection_modifyitems()`` to skip
50995099
tests based on a command-line option, allowing its sharing while preventing a
5100-
user error when acessing ``pytest.config`` before the argument parsing.
5100+
user error when accessing ``pytest.config`` before the argument parsing.
51015101
(`#2653 <https://github.com/pytest-dev/pytest/issues/2653>`_)
51025102

51035103

@@ -5509,7 +5509,7 @@ Changes
55095509
Thanks `@ojii`_ for the PR.
55105510

55115511
* Replace minor/patch level version numbers in the documentation with placeholders.
5512-
This significantly reduces change-noise as different contributors regnerate
5512+
This significantly reduces change-noise as different contributors regenerate
55135513
the documentation on different platforms.
55145514
Thanks `@RonnyPfannschmidt`_ for the PR.
55155515

scripts/release-on-comment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def validate_and_get_issue_comment_payload(
8282
) -> Tuple[str, str, bool]:
8383
payload = json.loads(issue_payload_path.read_text(encoding="UTF-8"))
8484
body = get_comment_data(payload)["body"]
85-
m = re.match(r"@pytestbot please prepare (major )?release from ([\w\-_\.]+)", body)
85+
m = re.match(r"@pytestbot please prepare (major )?release from ([-_.\w]+)", body)
8686
if m:
8787
is_major, base_branch = m.group(1) is not None, m.group(2)
8888
else:

src/_pytest/capture.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ def __init__(self, targetfd: int) -> None:
363363
except OSError:
364364
# FD capturing is conceptually simple -- create a temporary file,
365365
# redirect the FD to it, redirect back when done. But when the
366-
# target FD is invalid it throws a wrench into this loveley scheme.
366+
# target FD is invalid it throws a wrench into this lovely scheme.
367367
#
368368
# Tests themselves shouldn't care if the FD is valid, FD capturing
369369
# should work regardless of external circumstances. So falling back

src/_pytest/doctest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ def from_parent( # type: ignore
268268
runner: "doctest.DocTestRunner",
269269
dtest: "doctest.DocTest",
270270
):
271-
# incompatible signature due to to imposed limits on sublcass
271+
# incompatible signature due to imposed limits on subclass
272272
"""The public named constructor."""
273273
return super().from_parent(name=name, parent=parent, runner=runner, dtest=dtest)
274274

src/_pytest/store.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class StoreKey(Generic[T]):
2525

2626

2727
class Store:
28-
"""Store is a type-safe heterogenous mutable mapping that
28+
"""Store is a type-safe heterogeneous mutable mapping that
2929
allows keys and value types to be defined separately from
3030
where it (the Store) is created.
3131

testing/logging/test_reporting.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ def test_log_cli(request):
235235
]
236236
)
237237
result.stdout.no_fnmatch_line("*INFO message won't be shown*")
238-
# make sure that that we get a '0' exit code for the testsuite
238+
# make sure that we get a '0' exit code for the testsuite
239239
assert result.ret == 0
240240

241241

@@ -528,7 +528,7 @@ def test_log_cli(request):
528528
)
529529
result.stdout.no_fnmatch_line("*This log message won't be shown*")
530530

531-
# make sure that that we get a '0' exit code for the testsuite
531+
# make sure that we get a '0' exit code for the testsuite
532532
assert result.ret == 0
533533

534534
result = pytester.runpytest("-s", "--log-level=INFO")
@@ -542,7 +542,7 @@ def test_log_cli(request):
542542
)
543543
result.stdout.no_fnmatch_line("*This log message won't be shown*")
544544

545-
# make sure that that we get a '0' exit code for the testsuite
545+
# make sure that we get a '0' exit code for the testsuite
546546
assert result.ret == 0
547547

548548

@@ -578,7 +578,7 @@ def test_log_cli(request):
578578
)
579579
result.stdout.no_fnmatch_line("*This log message won't be shown*")
580580

581-
# make sure that that we get a '0' exit code for the testsuite
581+
# make sure that we get a '0' exit code for the testsuite
582582
assert result.ret == 0
583583

584584

@@ -653,7 +653,7 @@ def test_log_file(request):
653653
# fnmatch_lines does an assertion internally
654654
result.stdout.fnmatch_lines(["test_log_file_cli.py PASSED"])
655655

656-
# make sure that that we get a '0' exit code for the testsuite
656+
# make sure that we get a '0' exit code for the testsuite
657657
assert result.ret == 0
658658
assert os.path.isfile(log_file)
659659
with open(log_file) as rfh:
@@ -684,7 +684,7 @@ def test_log_file(request):
684684
# fnmatch_lines does an assertion internally
685685
result.stdout.fnmatch_lines(["test_log_file_cli_level.py PASSED"])
686686

687-
# make sure that that we get a '0' exit code for the testsuite
687+
# make sure that we get a '0' exit code for the testsuite
688688
assert result.ret == 0
689689
assert os.path.isfile(log_file)
690690
with open(log_file) as rfh:
@@ -735,7 +735,7 @@ def test_log_file(request):
735735
# fnmatch_lines does an assertion internally
736736
result.stdout.fnmatch_lines(["test_log_file_ini.py PASSED"])
737737

738-
# make sure that that we get a '0' exit code for the testsuite
738+
# make sure that we get a '0' exit code for the testsuite
739739
assert result.ret == 0
740740
assert os.path.isfile(log_file)
741741
with open(log_file) as rfh:
@@ -774,7 +774,7 @@ def test_log_file(request):
774774
# fnmatch_lines does an assertion internally
775775
result.stdout.fnmatch_lines(["test_log_file_ini_level.py PASSED"])
776776

777-
# make sure that that we get a '0' exit code for the testsuite
777+
# make sure that we get a '0' exit code for the testsuite
778778
assert result.ret == 0
779779
assert os.path.isfile(log_file)
780780
with open(log_file) as rfh:
@@ -808,7 +808,7 @@ def test_log_file():
808808

809809
result = pytester.runpytest()
810810

811-
# make sure that that we get a '0' exit code for the testsuite
811+
# make sure that we get a '0' exit code for the testsuite
812812
assert result.ret == 0
813813
assert os.path.isfile(log_file)
814814
with open(log_file, encoding="utf-8") as rfh:

testing/python/metafunc.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -692,9 +692,8 @@ def test_parametrize_indirect_list_functional(self, pytester: Pytester) -> None:
692692
"""
693693
#714
694694
Test parametrization with 'indirect' parameter applied on
695-
particular arguments. As y is is direct, its value should
696-
be used directly rather than being passed to the fixture
697-
y.
695+
particular arguments. As y is direct, its value should
696+
be used directly rather than being passed to the fixture y.
698697
699698
:param pytester: the instance of Pytester class, a temporary
700699
test directory.

0 commit comments

Comments
 (0)