Remove leftover constant tuple reference (#8062)

This PR removes the leftover reference to the tuple variant in
`Constant`.
This commit is contained in:
Dhruv Manilawala 2023-10-19 23:20:45 +05:30 committed by GitHub
parent a327b4da87
commit ec1be60dcb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 2 additions and 5 deletions

View file

@ -15,7 +15,6 @@ pub enum ConstantType {
Float,
Int,
Str,
Tuple,
}
impl TryFrom<&Constant> for ConstantType {

View file

@ -333,7 +333,6 @@ pub enum ComparableConstant<'a> {
Str { value: &'a str, unicode: bool },
Bytes(&'a [u8]),
Int(&'a ast::Int),
Tuple(Vec<ComparableConstant<'a>>),
Float(u64),
Complex { real: u64, imag: u64 },
Ellipsis,

View file

@ -2392,7 +2392,7 @@ pub struct PylintOptions {
/// Constant types to ignore when used as "magic values" (see: `PLR2004`).
#[option(
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#"
allow-magic-value-types = ["int"]
"#

3
ruff.schema.json generated
View file

@ -708,8 +708,7 @@
"complex",
"float",
"int",
"str",
"tuple"
"str"
]
},
"Convention": {