@@ -2,9 +2,9 @@ use itertools::Itertools;
22use ruff_python_ast as ast;
33
44use crate :: place:: { DefinedPlace , Definedness , Place } ;
5+ use crate :: semantic_index:: SemanticIndex ;
56use crate :: semantic_index:: definition:: Definition ;
67use crate :: semantic_index:: scope:: ScopeId ;
7- use crate :: semantic_index:: SemanticIndex ;
88use crate :: subscript:: { PyIndex , PySlice } ;
99use crate :: { Db , FxOrderSet } ;
1010
@@ -23,7 +23,9 @@ use super::instance::SliceLiteral;
2323use super :: special_form:: SpecialFormType ;
2424use super :: tuple:: { Tuple , TupleSpec } ;
2525use super :: visitor:: any_over_type;
26- use super :: { DynamicType , KnownInstanceType , Type , TypeAliasType , UnionBuilder , UnionType , todo_type} ;
26+ use super :: {
27+ DynamicType , KnownInstanceType , Type , TypeAliasType , UnionBuilder , UnionType , todo_type,
28+ } ;
2729
2830#[ derive( Debug ) ]
2931pub ( crate ) struct SubscriptError < ' db > {
@@ -32,7 +34,7 @@ pub(crate) struct SubscriptError<'db> {
3234}
3335
3436#[ derive( Debug ) ]
35- pub ( crate ) enum SubscriptErrorKind < ' db > {
37+ enum SubscriptErrorKind < ' db > {
3638 /// An index is out of bounds for a literal tuple/string/bytes subscript.
3739 IndexOutOfBounds {
3840 kind : & ' static str ,
@@ -81,14 +83,14 @@ pub(crate) enum SubscriptErrorKind<'db> {
8183}
8284
8385impl < ' db > SubscriptError < ' db > {
84- pub ( super ) fn new ( result_ty : Type < ' db > , error : SubscriptErrorKind < ' db > ) -> Self {
86+ fn new ( result_ty : Type < ' db > , error : SubscriptErrorKind < ' db > ) -> Self {
8587 Self {
8688 result_ty,
8789 errors : vec ! [ error] ,
8890 }
8991 }
9092
91- pub ( super ) fn with_errors ( result_ty : Type < ' db > , errors : Vec < SubscriptErrorKind < ' db > > ) -> Self {
93+ fn with_errors ( result_ty : Type < ' db > , errors : Vec < SubscriptErrorKind < ' db > > ) -> Self {
9294 Self { result_ty, errors }
9395 }
9496
@@ -253,7 +255,7 @@ impl<'db> SubscriptErrorKind<'db> {
253255 }
254256}
255257
256- pub ( super ) fn map_union_subscript < ' db , F > (
258+ fn map_union_subscript < ' db , F > (
257259 db : & ' db dyn Db ,
258260 union : UnionType < ' db > ,
259261 mut map_fn : F ,
0 commit comments