@@ -166,10 +166,10 @@ impl<'db> PatternPredicate<'db> {
166166 }
167167}
168168
169- /// A "placeholder predicate" that is used to model the fact that the boundness of a
170- /// (possible) definition or declaration caused by a `*` import cannot be fully determined
171- /// until type- inference time. This is essentially the same as a standard reachability constraint,
172- /// so we reuse the [`Predicate`] infrastructure to model it.
169+ /// A "placeholder predicate" that is used to model the fact that the boundness of a (possible)
170+ /// definition or declaration caused by a `*` import cannot be fully determined until type-
171+ /// inference time. This is essentially the same as a standard reachability constraint, so we reuse
172+ /// the [`Predicate`] infrastructure to model it.
173173///
174174/// To illustrate, say we have a module `exporter.py` like so:
175175///
@@ -183,14 +183,14 @@ impl<'db> PatternPredicate<'db> {
183183/// ```py
184184/// A = 1
185185///
186- /// from importer import *
186+ /// from exporter import *
187187/// ```
188188///
189- /// Since we cannot know whether or not <condition> is true at semantic-index time,
190- /// we record a definition for `A` in `b .py` as a result of the `from a import *`
191- /// statement, but place a predicate on it to record the fact that we don't yet
192- /// know whether this definition will be visible from all control-flow paths or not.
193- /// Essentially, we model `b.py` as something similar to this:
189+ /// Since we cannot know whether or not <condition> is true at semantic-index time, we record
190+ /// a definition for `A` in `importer .py` as a result of the `from exporter import *` statement,
191+ /// but place a predicate on it to record the fact that we don't yet know whether this definition
192+ /// will be visible from all control-flow paths or not. Essentially, we model `importer.py` as
193+ /// something similar to this:
194194///
195195/// ```py
196196/// A = 1
@@ -199,8 +199,8 @@ impl<'db> PatternPredicate<'db> {
199199/// from a import A
200200/// ```
201201///
202- /// At type-check time, the placeholder predicate for the `A` definition is evaluated by
203- /// attempting to resolve the `A` symbol in `a .py`'s global namespace:
202+ /// At type-check time, the placeholder predicate for the `A` definition is evaluated by attempting
203+ /// to resolve the `A` symbol in `exporter .py`'s global namespace:
204204/// - If it resolves to a definitely bound symbol, then the predicate resolves to [`Truthiness::AlwaysTrue`]
205205/// - If it resolves to an unbound symbol, then the predicate resolves to [`Truthiness::AlwaysFalse`]
206206/// - If it resolves to a possibly bound symbol, then the predicate resolves to [`Truthiness::Ambiguous`]
0 commit comments