mirror of https://github.com/astral-sh/ruff
clippy
This commit is contained in:
parent
81fc51e197
commit
72e0c32a99
|
|
@ -13,15 +13,14 @@ use crate::types::class::ClassType;
|
|||
use crate::types::class_base::ClassBase;
|
||||
use crate::types::constraints::ConstraintSet;
|
||||
use crate::types::instance::{Protocol, ProtocolInstanceType};
|
||||
use crate::types::signatures::{Parameters, ParametersKind};
|
||||
use crate::types::signatures::Parameters;
|
||||
use crate::types::tuple::{TupleSpec, TupleType, walk_tuple_type};
|
||||
use crate::types::visitor::{TypeCollector, TypeVisitor, walk_type_with_recursion_guard};
|
||||
use crate::types::{
|
||||
ApplyTypeMappingVisitor, BindingContext, BoundTypeVarIdentity, BoundTypeVarInstance,
|
||||
CallableSignature, CallableType, CallableTypeKind, CallableTypes, ClassLiteral,
|
||||
FindLegacyTypeVarsVisitor, HasRelationToVisitor, IsDisjointVisitor, IsEquivalentVisitor,
|
||||
KnownClass, KnownInstanceType, MaterializationKind, NormalizedVisitor, Signature, Type,
|
||||
TypeContext, TypeMapping, TypeRelation, TypeVarBoundOrConstraints, TypeVarIdentity,
|
||||
ClassLiteral, FindLegacyTypeVarsVisitor, HasRelationToVisitor, IsDisjointVisitor,
|
||||
IsEquivalentVisitor, KnownClass, KnownInstanceType, MaterializationKind, NormalizedVisitor,
|
||||
Type, TypeContext, TypeMapping, TypeRelation, TypeVarBoundOrConstraints, TypeVarIdentity,
|
||||
TypeVarInstance, TypeVarKind, TypeVarVariance, UnionType, declaration_type,
|
||||
walk_bound_type_var_type,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -153,10 +153,6 @@ impl<'db> CallableSignature<'db> {
|
|||
self.overloads.iter()
|
||||
}
|
||||
|
||||
pub(crate) fn as_slice(&self) -> &[Signature<'db>] {
|
||||
&self.overloads
|
||||
}
|
||||
|
||||
pub(crate) fn with_inherited_generic_context(
|
||||
&self,
|
||||
db: &'db dyn Db,
|
||||
|
|
@ -401,8 +397,8 @@ impl<'db> CallableSignature<'db> {
|
|||
}
|
||||
|
||||
/// Checks whether the given slice contains a single signature, and that signature is a
|
||||
/// ParamSpec signature. If so, returns the [`BoundTypeVarInstance`] for the ParamSpec, along
|
||||
/// with the return type of the signature.
|
||||
/// `ParamSpec` signature. If so, returns the [`BoundTypeVarInstance`] for the `ParamSpec`,
|
||||
/// along with the return type of the signature.
|
||||
fn signatures_is_single_paramspec(
|
||||
signatures: &[Signature<'db>],
|
||||
) -> Option<(BoundTypeVarInstance<'db>, Option<Type<'db>>)> {
|
||||
|
|
|
|||
Loading…
Reference in New Issue