From 960a60fb4d1802bcede305e042b00917158b655e Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Thu, 8 Feb 2024 16:11:34 -0500 Subject: [PATCH] Move new sections to the end --- .../test/fixtures/pydocstyle/sections.py | 63 +++--- ...__pydocstyle__tests__D214_sections.py.snap | 32 +-- ...__pydocstyle__tests__D406_sections.py.snap | 43 ++-- ...__pydocstyle__tests__D407_sections.py.snap | 208 +++++++++--------- ...__pydocstyle__tests__D409_sections.py.snap | 60 +++-- ...__pydocstyle__tests__D413_sections.py.snap | 171 +++++++------- ...__pydocstyle__tests__D414_sections.py.snap | 18 +- ...__pydocstyle__tests__D417_sections.py.snap | 40 ++-- 8 files changed, 318 insertions(+), 317 deletions(-) diff --git a/crates/ruff_linter/resources/test/fixtures/pydocstyle/sections.py b/crates/ruff_linter/resources/test/fixtures/pydocstyle/sections.py index e7524901b7f6f..9d3c7946b4bb9 100644 --- a/crates/ruff_linter/resources/test/fixtures/pydocstyle/sections.py +++ b/crates/ruff_linter/resources/test/fixtures/pydocstyle/sections.py @@ -428,25 +428,6 @@ def test_method(self, test, another_test, z, _, x=1, y=2, _private_arg=1): # no """ - def test_method_should_be_correctly_capitalized(self, parameters: list[str], other_parameters: dict[str, str]): # noqa: D213 - """Test parameters and attributes sections are capitalized correctly. - - Parameters - ---------- - parameters: - A list of string parameters - other_parameters: - A dictionary of string attributes - - Other Parameters - ---------- - other_parameters: - A dictionary of string attributes - parameters: - A list of string parameters - - """ - @expect("D417: Missing argument descriptions in the docstring " "(argument(s) test, y, z are missing descriptions in " "'test_missing_args' docstring)", arg_count=5) @@ -507,18 +488,6 @@ def test_mixing_numpy_and_google(danger): # noqa: D213 """ - @staticmethod - def test_lowercase_sub_section_header_should_be_valid(parameters: list[str], value: int): # noqa: D213 - """Test that lower case sub-section header is valid even if it has the same name as section kind. - - Parameters: - ---------- - parameters: - A list of string parameters - value: - Some value - """ - class TestIncorrectIndent: # noqa: D203 """Test class.""" @@ -593,3 +562,35 @@ def titlecase_sub_section_header(): Returns: """ + + +def test_method_should_be_correctly_capitalized(parameters: list[str], other_parameters: dict[str, str]): # noqa: D213 + """Test parameters and attributes sections are capitalized correctly. + + Parameters + ---------- + parameters: + A list of string parameters + other_parameters: + A dictionary of string attributes + + Other Parameters + ---------- + other_parameters: + A dictionary of string attributes + parameters: + A list of string parameters + + """ + + +def test_lowercase_sub_section_header_should_be_valid(parameters: list[str], value: int): # noqa: D213 + """Test that lower case subsection header is valid even if it has the same name as section kind. + + Parameters: + ---------- + parameters: + A list of string parameters + value: + Some value + """ diff --git a/crates/ruff_linter/src/rules/pydocstyle/snapshots/ruff_linter__rules__pydocstyle__tests__D214_sections.py.snap b/crates/ruff_linter/src/rules/pydocstyle/snapshots/ruff_linter__rules__pydocstyle__tests__D214_sections.py.snap index 4b52c795bfbc1..d8ce888327b5c 100644 --- a/crates/ruff_linter/src/rules/pydocstyle/snapshots/ruff_linter__rules__pydocstyle__tests__D214_sections.py.snap +++ b/crates/ruff_linter/src/rules/pydocstyle/snapshots/ruff_linter__rules__pydocstyle__tests__D214_sections.py.snap @@ -27,27 +27,29 @@ sections.py:144:5: D214 [*] Section is over-indented ("Returns") 148 148 | A value of some sort. 149 149 | -sections.py:589:5: D214 [*] Section is over-indented ("Returns") +sections.py:558:5: D214 [*] Section is over-indented ("Returns") | -588 | def titlecase_sub_section_header(): -589 | """Below, `Returns:` should be considered a section header. +557 | def titlecase_sub_section_header(): +558 | """Below, `Returns:` should be considered a section header. | _____^ -590 | | -591 | | Args: -592 | | Here's a note. -593 | | -594 | | Returns: -595 | | """ +559 | | +560 | | Args: +561 | | Here's a note. +562 | | +563 | | Returns: +564 | | """ | |_______^ D214 | = help: Remove over-indentation from "Returns" ℹ Safe fix -591 591 | Args: -592 592 | Here's a note. -593 593 | -594 |- Returns: - 594 |+ Returns: -595 595 | """ +560 560 | Args: +561 561 | Here's a note. +562 562 | +563 |- Returns: + 563 |+ Returns: +564 564 | """ +565 565 | +566 566 | diff --git a/crates/ruff_linter/src/rules/pydocstyle/snapshots/ruff_linter__rules__pydocstyle__tests__D406_sections.py.snap b/crates/ruff_linter/src/rules/pydocstyle/snapshots/ruff_linter__rules__pydocstyle__tests__D406_sections.py.snap index 4afd15c144991..14530459e76bd 100644 --- a/crates/ruff_linter/src/rules/pydocstyle/snapshots/ruff_linter__rules__pydocstyle__tests__D406_sections.py.snap +++ b/crates/ruff_linter/src/rules/pydocstyle/snapshots/ruff_linter__rules__pydocstyle__tests__D406_sections.py.snap @@ -61,32 +61,31 @@ sections.py:216:5: D406 [*] Section name should end with a newline ("Raises") 229 229 | 230 230 | """ -sections.py:512:9: D406 [*] Section name should end with a newline ("Parameters") +sections.py:588:5: D406 [*] Section name should end with a newline ("Parameters") | -510 | @staticmethod -511 | def test_lowercase_sub_section_header_should_be_valid(parameters: list[str], value: int): # noqa: D213 -512 | """Test that lower case sub-section header is valid even if it has the same name as section kind. - | _________^ -513 | | -514 | | Parameters: -515 | | ---------- -516 | | parameters: -517 | | A list of string parameters -518 | | value: -519 | | Some value -520 | | """ - | |___________^ D406 +587 | def test_lowercase_sub_section_header_should_be_valid(parameters: list[str], value: int): # noqa: D213 +588 | """Test that lower case subsection header is valid even if it has the same name as section kind. + | _____^ +589 | | +590 | | Parameters: +591 | | ---------- +592 | | parameters: +593 | | A list of string parameters +594 | | value: +595 | | Some value +596 | | """ + | |_______^ D406 | = help: Add newline after "Parameters" ℹ Safe fix -511 511 | def test_lowercase_sub_section_header_should_be_valid(parameters: list[str], value: int): # noqa: D213 -512 512 | """Test that lower case sub-section header is valid even if it has the same name as section kind. -513 513 | -514 |- Parameters: - 514 |+ Parameters -515 515 | ---------- -516 516 | parameters: -517 517 | A list of string parameters +587 587 | def test_lowercase_sub_section_header_should_be_valid(parameters: list[str], value: int): # noqa: D213 +588 588 | """Test that lower case subsection header is valid even if it has the same name as section kind. +589 589 | +590 |- Parameters: + 590 |+ Parameters +591 591 | ---------- +592 592 | parameters: +593 593 | A list of string parameters diff --git a/crates/ruff_linter/src/rules/pydocstyle/snapshots/ruff_linter__rules__pydocstyle__tests__D407_sections.py.snap b/crates/ruff_linter/src/rules/pydocstyle/snapshots/ruff_linter__rules__pydocstyle__tests__D407_sections.py.snap index 916cb0110c874..e35fef3a80703 100644 --- a/crates/ruff_linter/src/rules/pydocstyle/snapshots/ruff_linter__rules__pydocstyle__tests__D407_sections.py.snap +++ b/crates/ruff_linter/src/rules/pydocstyle/snapshots/ruff_linter__rules__pydocstyle__tests__D407_sections.py.snap @@ -427,145 +427,147 @@ sections.py:380:9: D407 [*] Missing dashed underline after section ("Args") 384 385 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. 385 386 | Etiam at tellus a tellus faucibus maximus. Curabitur tellus -sections.py:530:9: D407 [*] Missing dashed underline after section ("Args") +sections.py:499:9: D407 [*] Missing dashed underline after section ("Args") | -528 | "'test_incorrect_indent' docstring)", arg_count=3) -529 | def test_incorrect_indent(self, x=1, y=2): # noqa: D207, D213, D407 -530 | """Reproducing issue #437. +497 | "'test_incorrect_indent' docstring)", arg_count=3) +498 | def test_incorrect_indent(self, x=1, y=2): # noqa: D207, D213, D407 +499 | """Reproducing issue #437. | _________^ -531 | | -532 | | Testing this incorrectly indented docstring. -533 | | -534 | | Args: -535 | | x: Test argument. -536 | | -537 | | """ +500 | | +501 | | Testing this incorrectly indented docstring. +502 | | +503 | | Args: +504 | | x: Test argument. +505 | | +506 | | """ | |___________^ D407 | = help: Add dashed line under "Args" ℹ Safe fix -532 532 | Testing this incorrectly indented docstring. -533 533 | -534 534 | Args: - 535 |+ ---- -535 536 | x: Test argument. -536 537 | -537 538 | """ - -sections.py:550:5: D407 [*] Missing dashed underline after section ("Parameters") - | -549 | def replace_equals_with_dash(): -550 | """Equal length equals should be replaced with dashes. +501 501 | Testing this incorrectly indented docstring. +502 502 | +503 503 | Args: + 504 |+ ---- +504 505 | x: Test argument. +505 506 | +506 507 | """ + +sections.py:519:5: D407 [*] Missing dashed underline after section ("Parameters") + | +518 | def replace_equals_with_dash(): +519 | """Equal length equals should be replaced with dashes. | _____^ -551 | | -552 | | Parameters -553 | | ========== -554 | | """ +520 | | +521 | | Parameters +522 | | ========== +523 | | """ | |_______^ D407 | = help: Add dashed line under "Parameters" ℹ Safe fix -550 550 | """Equal length equals should be replaced with dashes. -551 551 | -552 552 | Parameters -553 |- ========== - 553 |+ ---------- -554 554 | """ -555 555 | -556 556 | - -sections.py:558:5: D407 [*] Missing dashed underline after section ("Parameters") - | -557 | def replace_equals_with_dash2(): -558 | """Here, the length of equals is not the same. +519 519 | """Equal length equals should be replaced with dashes. +520 520 | +521 521 | Parameters +522 |- ========== + 522 |+ ---------- +523 523 | """ +524 524 | +525 525 | + +sections.py:527:5: D407 [*] Missing dashed underline after section ("Parameters") + | +526 | def replace_equals_with_dash2(): +527 | """Here, the length of equals is not the same. | _____^ -559 | | -560 | | Parameters -561 | | =========== -562 | | """ +528 | | +529 | | Parameters +530 | | =========== +531 | | """ | |_______^ D407 | = help: Add dashed line under "Parameters" ℹ Safe fix -558 558 | """Here, the length of equals is not the same. -559 559 | -560 560 | Parameters - 561 |+ ---------- -561 562 | =========== -562 563 | """ -563 564 | - -sections.py:579:5: D407 [*] Missing dashed underline after section ("Args") - | -578 | def lowercase_sub_section_header(): -579 | """Below, `returns:` should _not_ be considered a section header. +527 527 | """Here, the length of equals is not the same. +528 528 | +529 529 | Parameters + 530 |+ ---------- +530 531 | =========== +531 532 | """ +532 533 | + +sections.py:548:5: D407 [*] Missing dashed underline after section ("Args") + | +547 | def lowercase_sub_section_header(): +548 | """Below, `returns:` should _not_ be considered a section header. | _____^ -580 | | -581 | | Args: -582 | | Here's a note. -583 | | -584 | | returns: -585 | | """ +549 | | +550 | | Args: +551 | | Here's a note. +552 | | +553 | | returns: +554 | | """ | |_______^ D407 | = help: Add dashed line under "Args" ℹ Safe fix -579 579 | """Below, `returns:` should _not_ be considered a section header. -580 580 | -581 581 | Args: - 582 |+ ---- -582 583 | Here's a note. -583 584 | -584 585 | returns: - -sections.py:589:5: D407 [*] Missing dashed underline after section ("Args") - | -588 | def titlecase_sub_section_header(): -589 | """Below, `Returns:` should be considered a section header. +548 548 | """Below, `returns:` should _not_ be considered a section header. +549 549 | +550 550 | Args: + 551 |+ ---- +551 552 | Here's a note. +552 553 | +553 554 | returns: + +sections.py:558:5: D407 [*] Missing dashed underline after section ("Args") + | +557 | def titlecase_sub_section_header(): +558 | """Below, `Returns:` should be considered a section header. | _____^ -590 | | -591 | | Args: -592 | | Here's a note. -593 | | -594 | | Returns: -595 | | """ +559 | | +560 | | Args: +561 | | Here's a note. +562 | | +563 | | Returns: +564 | | """ | |_______^ D407 | = help: Add dashed line under "Args" ℹ Safe fix -589 589 | """Below, `Returns:` should be considered a section header. -590 590 | -591 591 | Args: - 592 |+ ---- -592 593 | Here's a note. -593 594 | -594 595 | Returns: - -sections.py:589:5: D407 [*] Missing dashed underline after section ("Returns") - | -588 | def titlecase_sub_section_header(): -589 | """Below, `Returns:` should be considered a section header. +558 558 | """Below, `Returns:` should be considered a section header. +559 559 | +560 560 | Args: + 561 |+ ---- +561 562 | Here's a note. +562 563 | +563 564 | Returns: + +sections.py:558:5: D407 [*] Missing dashed underline after section ("Returns") + | +557 | def titlecase_sub_section_header(): +558 | """Below, `Returns:` should be considered a section header. | _____^ -590 | | -591 | | Args: -592 | | Here's a note. -593 | | -594 | | Returns: -595 | | """ +559 | | +560 | | Args: +561 | | Here's a note. +562 | | +563 | | Returns: +564 | | """ | |_______^ D407 | = help: Add dashed line under "Returns" ℹ Safe fix -592 592 | Here's a note. -593 593 | -594 594 | Returns: - 595 |+ ------- -595 596 | """ +561 561 | Here's a note. +562 562 | +563 563 | Returns: + 564 |+ ------- +564 565 | """ +565 566 | +566 567 | diff --git a/crates/ruff_linter/src/rules/pydocstyle/snapshots/ruff_linter__rules__pydocstyle__tests__D409_sections.py.snap b/crates/ruff_linter/src/rules/pydocstyle/snapshots/ruff_linter__rules__pydocstyle__tests__D409_sections.py.snap index e600d19fb5104..881b5a0f0f099 100644 --- a/crates/ruff_linter/src/rules/pydocstyle/snapshots/ruff_linter__rules__pydocstyle__tests__D409_sections.py.snap +++ b/crates/ruff_linter/src/rules/pydocstyle/snapshots/ruff_linter__rules__pydocstyle__tests__D409_sections.py.snap @@ -61,41 +61,39 @@ sections.py:216:5: D409 [*] Section underline should match the length of its nam 227 227 | Raises: 228 228 | My attention. -sections.py:432:9: D409 [*] Section underline should match the length of its name ("Other Parameters") +sections.py:568:5: D409 [*] Section underline should match the length of its name ("Other Parameters") | -431 | def test_method_should_be_correctly_capitalized(self, parameters: list[str], other_parameters: dict[str, str]): # noqa: D213 -432 | """Test parameters and attributes sections are capitalized correctly. - | _________^ -433 | | -434 | | Parameters -435 | | ---------- -436 | | parameters: -437 | | A list of string parameters -438 | | other_parameters: -439 | | A dictionary of string attributes -440 | | -441 | | Other Parameters -442 | | ---------- -443 | | other_parameters: -444 | | A dictionary of string attributes -445 | | parameters: -446 | | A list of string parameters -447 | | -448 | | """ - | |___________^ D409 -449 | -450 | @expect("D417: Missing argument descriptions in the docstring " +567 | def test_method_should_be_correctly_capitalized(parameters: list[str], other_parameters: dict[str, str]): # noqa: D213 +568 | """Test parameters and attributes sections are capitalized correctly. + | _____^ +569 | | +570 | | Parameters +571 | | ---------- +572 | | parameters: +573 | | A list of string parameters +574 | | other_parameters: +575 | | A dictionary of string attributes +576 | | +577 | | Other Parameters +578 | | ---------- +579 | | other_parameters: +580 | | A dictionary of string attributes +581 | | parameters: +582 | | A list of string parameters +583 | | +584 | | """ + | |_______^ D409 | = help: Adjust underline length to match "Other Parameters" ℹ Safe fix -439 439 | A dictionary of string attributes -440 440 | -441 441 | Other Parameters -442 |- ---------- - 442 |+ ---------------- -443 443 | other_parameters: -444 444 | A dictionary of string attributes -445 445 | parameters: +575 575 | A dictionary of string attributes +576 576 | +577 577 | Other Parameters +578 |- ---------- + 578 |+ ---------------- +579 579 | other_parameters: +580 580 | A dictionary of string attributes +581 581 | parameters: diff --git a/crates/ruff_linter/src/rules/pydocstyle/snapshots/ruff_linter__rules__pydocstyle__tests__D413_sections.py.snap b/crates/ruff_linter/src/rules/pydocstyle/snapshots/ruff_linter__rules__pydocstyle__tests__D413_sections.py.snap index c8ccf0edec949..ee2f7fba886d7 100644 --- a/crates/ruff_linter/src/rules/pydocstyle/snapshots/ruff_linter__rules__pydocstyle__tests__D413_sections.py.snap +++ b/crates/ruff_linter/src/rules/pydocstyle/snapshots/ruff_linter__rules__pydocstyle__tests__D413_sections.py.snap @@ -72,121 +72,120 @@ sections.py:170:5: D413 [*] Missing blank line after last section ("Returns") 175 176 | 176 177 | -sections.py:512:9: D413 [*] Missing blank line after last section ("Parameters") +sections.py:519:5: D413 [*] Missing blank line after last section ("Parameters") | -510 | @staticmethod -511 | def test_lowercase_sub_section_header_should_be_valid(parameters: list[str], value: int): # noqa: D213 -512 | """Test that lower case sub-section header is valid even if it has the same name as section kind. - | _________^ -513 | | -514 | | Parameters: -515 | | ---------- -516 | | parameters: -517 | | A list of string parameters -518 | | value: -519 | | Some value -520 | | """ - | |___________^ D413 +518 | def replace_equals_with_dash(): +519 | """Equal length equals should be replaced with dashes. + | _____^ +520 | | +521 | | Parameters +522 | | ========== +523 | | """ + | |_______^ D413 | = help: Add blank line after "Parameters" ℹ Safe fix -517 517 | A list of string parameters -518 518 | value: -519 519 | Some value - 520 |+ -520 521 | """ -521 522 | -522 523 | - -sections.py:550:5: D413 [*] Missing blank line after last section ("Parameters") +520 520 | +521 521 | Parameters +522 522 | ========== + 523 |+ +523 524 | """ +524 525 | +525 526 | + +sections.py:527:5: D413 [*] Missing blank line after last section ("Parameters") | -549 | def replace_equals_with_dash(): -550 | """Equal length equals should be replaced with dashes. +526 | def replace_equals_with_dash2(): +527 | """Here, the length of equals is not the same. | _____^ -551 | | -552 | | Parameters -553 | | ========== -554 | | """ +528 | | +529 | | Parameters +530 | | =========== +531 | | """ | |_______^ D413 | = help: Add blank line after "Parameters" ℹ Safe fix -551 551 | -552 552 | Parameters -553 553 | ========== - 554 |+ -554 555 | """ -555 556 | -556 557 | - -sections.py:558:5: D413 [*] Missing blank line after last section ("Parameters") +528 528 | +529 529 | Parameters +530 530 | =========== + 531 |+ +531 532 | """ +532 533 | +533 534 | + +sections.py:548:5: D413 [*] Missing blank line after last section ("Args") | -557 | def replace_equals_with_dash2(): -558 | """Here, the length of equals is not the same. +547 | def lowercase_sub_section_header(): +548 | """Below, `returns:` should _not_ be considered a section header. | _____^ -559 | | -560 | | Parameters -561 | | =========== -562 | | """ +549 | | +550 | | Args: +551 | | Here's a note. +552 | | +553 | | returns: +554 | | """ | |_______^ D413 | - = help: Add blank line after "Parameters" + = help: Add blank line after "Args" ℹ Safe fix -559 559 | -560 560 | Parameters -561 561 | =========== - 562 |+ -562 563 | """ -563 564 | -564 565 | - -sections.py:579:5: D413 [*] Missing blank line after last section ("Args") +551 551 | Here's a note. +552 552 | +553 553 | returns: + 554 |+ +554 555 | """ +555 556 | +556 557 | + +sections.py:558:5: D413 [*] Missing blank line after last section ("Returns") | -578 | def lowercase_sub_section_header(): -579 | """Below, `returns:` should _not_ be considered a section header. +557 | def titlecase_sub_section_header(): +558 | """Below, `Returns:` should be considered a section header. | _____^ -580 | | -581 | | Args: -582 | | Here's a note. -583 | | -584 | | returns: -585 | | """ +559 | | +560 | | Args: +561 | | Here's a note. +562 | | +563 | | Returns: +564 | | """ | |_______^ D413 | - = help: Add blank line after "Args" + = help: Add blank line after "Returns" ℹ Safe fix -582 582 | Here's a note. -583 583 | -584 584 | returns: - 585 |+ -585 586 | """ -586 587 | -587 588 | - -sections.py:589:5: D413 [*] Missing blank line after last section ("Returns") +561 561 | Here's a note. +562 562 | +563 563 | Returns: + 564 |+ +564 565 | """ +565 566 | +566 567 | + +sections.py:588:5: D413 [*] Missing blank line after last section ("Parameters") | -588 | def titlecase_sub_section_header(): -589 | """Below, `Returns:` should be considered a section header. +587 | def test_lowercase_sub_section_header_should_be_valid(parameters: list[str], value: int): # noqa: D213 +588 | """Test that lower case subsection header is valid even if it has the same name as section kind. | _____^ -590 | | -591 | | Args: -592 | | Here's a note. -593 | | -594 | | Returns: -595 | | """ +589 | | +590 | | Parameters: +591 | | ---------- +592 | | parameters: +593 | | A list of string parameters +594 | | value: +595 | | Some value +596 | | """ | |_______^ D413 | - = help: Add blank line after "Returns" + = help: Add blank line after "Parameters" ℹ Safe fix -592 592 | Here's a note. -593 593 | -594 594 | Returns: - 595 |+ -595 596 | """ +593 593 | A list of string parameters +594 594 | value: +595 595 | Some value + 596 |+ +596 597 | """ diff --git a/crates/ruff_linter/src/rules/pydocstyle/snapshots/ruff_linter__rules__pydocstyle__tests__D414_sections.py.snap b/crates/ruff_linter/src/rules/pydocstyle/snapshots/ruff_linter__rules__pydocstyle__tests__D414_sections.py.snap index 171167289c3de..9566fd691a6d4 100644 --- a/crates/ruff_linter/src/rules/pydocstyle/snapshots/ruff_linter__rules__pydocstyle__tests__D414_sections.py.snap +++ b/crates/ruff_linter/src/rules/pydocstyle/snapshots/ruff_linter__rules__pydocstyle__tests__D414_sections.py.snap @@ -97,17 +97,17 @@ sections.py:261:5: D414 Section has no content ("Returns") | |_______^ D414 | -sections.py:589:5: D414 Section has no content ("Returns") +sections.py:558:5: D414 Section has no content ("Returns") | -588 | def titlecase_sub_section_header(): -589 | """Below, `Returns:` should be considered a section header. +557 | def titlecase_sub_section_header(): +558 | """Below, `Returns:` should be considered a section header. | _____^ -590 | | -591 | | Args: -592 | | Here's a note. -593 | | -594 | | Returns: -595 | | """ +559 | | +560 | | Args: +561 | | Here's a note. +562 | | +563 | | Returns: +564 | | """ | |_______^ D414 | diff --git a/crates/ruff_linter/src/rules/pydocstyle/snapshots/ruff_linter__rules__pydocstyle__tests__D417_sections.py.snap b/crates/ruff_linter/src/rules/pydocstyle/snapshots/ruff_linter__rules__pydocstyle__tests__D417_sections.py.snap index 2d276f575ac90..1ea30245856fa 100644 --- a/crates/ruff_linter/src/rules/pydocstyle/snapshots/ruff_linter__rules__pydocstyle__tests__D417_sections.py.snap +++ b/crates/ruff_linter/src/rules/pydocstyle/snapshots/ruff_linter__rules__pydocstyle__tests__D417_sections.py.snap @@ -64,40 +64,40 @@ sections.py:398:5: D417 Missing argument description in the docstring for `test_ 399 | """Toggle the gizmo. | -sections.py:453:9: D417 Missing argument descriptions in the docstring for `test_missing_args`: `test`, `y`, `z` +sections.py:434:9: D417 Missing argument descriptions in the docstring for `test_missing_args`: `test`, `y`, `z` | -451 | "(argument(s) test, y, z are missing descriptions in " -452 | "'test_missing_args' docstring)", arg_count=5) -453 | def test_missing_args(self, test, x, y, z=3, t=1, _private=0): # noqa: D213, D407 +432 | "(argument(s) test, y, z are missing descriptions in " +433 | "'test_missing_args' docstring)", arg_count=5) +434 | def test_missing_args(self, test, x, y, z=3, t=1, _private=0): # noqa: D213, D407 | ^^^^^^^^^^^^^^^^^ D417 -454 | """Test a valid args section. +435 | """Test a valid args section. | -sections.py:468:9: D417 Missing argument descriptions in the docstring for `test_missing_args_class_method`: `test`, `y`, `z` +sections.py:449:9: D417 Missing argument descriptions in the docstring for `test_missing_args_class_method`: `test`, `y`, `z` | -466 | "(argument(s) test, y, z are missing descriptions in " -467 | "'test_missing_args_class_method' docstring)", arg_count=4) -468 | def test_missing_args_class_method(cls, test, x, y, z=3): # noqa: D213, D407 +447 | "(argument(s) test, y, z are missing descriptions in " +448 | "'test_missing_args_class_method' docstring)", arg_count=4) +449 | def test_missing_args_class_method(cls, test, x, y, z=3): # noqa: D213, D407 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ D417 -469 | """Test a valid args section. +450 | """Test a valid args section. | -sections.py:487:9: D417 Missing argument descriptions in the docstring for `test_missing_args_static_method`: `a`, `z` +sections.py:468:9: D417 Missing argument descriptions in the docstring for `test_missing_args_static_method`: `a`, `z` | -485 | "(argument(s) a, z are missing descriptions in " -486 | "'test_missing_args_static_method' docstring)", arg_count=3) -487 | def test_missing_args_static_method(a, x, y, z=3, t=1): # noqa: D213, D407 +466 | "(argument(s) a, z are missing descriptions in " +467 | "'test_missing_args_static_method' docstring)", arg_count=3) +468 | def test_missing_args_static_method(a, x, y, z=3, t=1): # noqa: D213, D407 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ D417 -488 | """Test a valid args section. +469 | """Test a valid args section. | -sections.py:529:9: D417 Missing argument description in the docstring for `test_incorrect_indent`: `y` +sections.py:498:9: D417 Missing argument description in the docstring for `test_incorrect_indent`: `y` | -527 | "(argument(s) y are missing descriptions in " -528 | "'test_incorrect_indent' docstring)", arg_count=3) -529 | def test_incorrect_indent(self, x=1, y=2): # noqa: D207, D213, D407 +496 | "(argument(s) y are missing descriptions in " +497 | "'test_incorrect_indent' docstring)", arg_count=3) +498 | def test_incorrect_indent(self, x=1, y=2): # noqa: D207, D213, D407 | ^^^^^^^^^^^^^^^^^^^^^ D417 -530 | """Reproducing issue #437. +499 | """Reproducing issue #437. |