mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-26 11:59:35 +00:00
Remove leftover constant tuple reference (#8062)
This PR removes the leftover reference to the tuple variant in `Constant`.
This commit is contained in:
parent
a327b4da87
commit
ec1be60dcb
4 changed files with 2 additions and 5 deletions
|
@ -15,7 +15,6 @@ pub enum ConstantType {
|
||||||
Float,
|
Float,
|
||||||
Int,
|
Int,
|
||||||
Str,
|
Str,
|
||||||
Tuple,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl TryFrom<&Constant> for ConstantType {
|
impl TryFrom<&Constant> for ConstantType {
|
||||||
|
|
|
@ -333,7 +333,6 @@ pub enum ComparableConstant<'a> {
|
||||||
Str { value: &'a str, unicode: bool },
|
Str { value: &'a str, unicode: bool },
|
||||||
Bytes(&'a [u8]),
|
Bytes(&'a [u8]),
|
||||||
Int(&'a ast::Int),
|
Int(&'a ast::Int),
|
||||||
Tuple(Vec<ComparableConstant<'a>>),
|
|
||||||
Float(u64),
|
Float(u64),
|
||||||
Complex { real: u64, imag: u64 },
|
Complex { real: u64, imag: u64 },
|
||||||
Ellipsis,
|
Ellipsis,
|
||||||
|
|
|
@ -2392,7 +2392,7 @@ pub struct PylintOptions {
|
||||||
/// Constant types to ignore when used as "magic values" (see: `PLR2004`).
|
/// Constant types to ignore when used as "magic values" (see: `PLR2004`).
|
||||||
#[option(
|
#[option(
|
||||||
default = r#"["str", "bytes"]"#,
|
default = r#"["str", "bytes"]"#,
|
||||||
value_type = r#"list["str" | "bytes" | "complex" | "float" | "int" | "tuple"]"#,
|
value_type = r#"list["str" | "bytes" | "complex" | "float" | "int"]"#,
|
||||||
example = r#"
|
example = r#"
|
||||||
allow-magic-value-types = ["int"]
|
allow-magic-value-types = ["int"]
|
||||||
"#
|
"#
|
||||||
|
|
3
ruff.schema.json
generated
3
ruff.schema.json
generated
|
@ -708,8 +708,7 @@
|
||||||
"complex",
|
"complex",
|
||||||
"float",
|
"float",
|
||||||
"int",
|
"int",
|
||||||
"str",
|
"str"
|
||||||
"tuple"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"Convention": {
|
"Convention": {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue