mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-30 13:51:16 +00:00
[pandas-vet
] Deprecate pandas-df-variable-name
(PD901
) (#18618)
Summary -- Deprecates PD901 as part of #7710. I don't feel particularly strongly about this one, though I have certainly used `df` as a dataframe name in the past, just going through the open issues in the 0.12 milestone. Test Plan -- N/a
This commit is contained in:
parent
34dc8e0531
commit
33c8c7569d
2 changed files with 5 additions and 1 deletions
|
@ -752,7 +752,7 @@ pub fn code_to_rule(linter: Linter, code: &str) -> Option<(RuleGroup, Rule)> {
|
||||||
(PandasVet, "013") => (RuleGroup::Stable, rules::pandas_vet::rules::PandasUseOfDotStack),
|
(PandasVet, "013") => (RuleGroup::Stable, rules::pandas_vet::rules::PandasUseOfDotStack),
|
||||||
(PandasVet, "015") => (RuleGroup::Stable, rules::pandas_vet::rules::PandasUseOfPdMerge),
|
(PandasVet, "015") => (RuleGroup::Stable, rules::pandas_vet::rules::PandasUseOfPdMerge),
|
||||||
(PandasVet, "101") => (RuleGroup::Stable, rules::pandas_vet::rules::PandasNuniqueConstantSeriesCheck),
|
(PandasVet, "101") => (RuleGroup::Stable, rules::pandas_vet::rules::PandasNuniqueConstantSeriesCheck),
|
||||||
(PandasVet, "901") => (RuleGroup::Stable, rules::pandas_vet::rules::PandasDfVariableName),
|
(PandasVet, "901") => (RuleGroup::Deprecated, rules::pandas_vet::rules::PandasDfVariableName),
|
||||||
|
|
||||||
// flake8-errmsg
|
// flake8-errmsg
|
||||||
(Flake8ErrMsg, "101") => (RuleGroup::Stable, rules::flake8_errmsg::rules::RawStringInException),
|
(Flake8ErrMsg, "101") => (RuleGroup::Stable, rules::flake8_errmsg::rules::RawStringInException),
|
||||||
|
|
|
@ -4,6 +4,10 @@ use ruff_text_size::Ranged;
|
||||||
|
|
||||||
use crate::{Violation, checkers::ast::Checker};
|
use crate::{Violation, checkers::ast::Checker};
|
||||||
|
|
||||||
|
/// ## Deprecated
|
||||||
|
///
|
||||||
|
/// This rule has been deprecated as it's highly opinionated and overly strict in most cases.
|
||||||
|
///
|
||||||
/// ## What it does
|
/// ## What it does
|
||||||
/// Checks for assignments to the variable `df`.
|
/// Checks for assignments to the variable `df`.
|
||||||
///
|
///
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue