mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-28 21:05:08 +00:00
[flake8-pytest-style
] Implement pytest.warns diagnostics (PT029
, PT030
, PT031
) (#15444)
## Summary Implements upstream diagnostics `PT029`, `PT030`, `PT031` that function as pytest.warns corollaries of `PT010`, `PT011`, `PT012` respectively. Most of the implementation and documentation is designed to mirror those existing diagnostics. Closes #14239 ## Test Plan Tests for `PT029`, `PT030`, `PT031` largely copied from `PT010`, `PT011`, `PT012` respectively. `cargo nextest run` --------- Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
This commit is contained in:
parent
fa11b08766
commit
347ab5b47a
20 changed files with 823 additions and 0 deletions
|
@ -830,6 +830,9 @@ pub fn code_to_rule(linter: Linter, code: &str) -> Option<(RuleGroup, Rule)> {
|
|||
(Flake8PytestStyle, "025") => (RuleGroup::Stable, rules::flake8_pytest_style::rules::PytestErroneousUseFixturesOnFixture),
|
||||
(Flake8PytestStyle, "026") => (RuleGroup::Stable, rules::flake8_pytest_style::rules::PytestUseFixturesWithoutParameters),
|
||||
(Flake8PytestStyle, "027") => (RuleGroup::Stable, rules::flake8_pytest_style::rules::PytestUnittestRaisesAssertion),
|
||||
(Flake8PytestStyle, "029") => (RuleGroup::Preview, rules::flake8_pytest_style::rules::PytestWarnsWithoutWarning),
|
||||
(Flake8PytestStyle, "030") => (RuleGroup::Preview, rules::flake8_pytest_style::rules::PytestWarnsTooBroad),
|
||||
(Flake8PytestStyle, "031") => (RuleGroup::Preview, rules::flake8_pytest_style::rules::PytestWarnsWithMultipleStatements),
|
||||
|
||||
// flake8-pie
|
||||
(Flake8Pie, "790") => (RuleGroup::Stable, rules::flake8_pie::rules::UnnecessaryPlaceholder),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue