resolvePythonModuleMember (`mod.member` after `import mod` / `from pkg import
mod`) looks the member up with pythonModuleSymbol, so a package's
__init__.py re-exports lead to the definition.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
pythonModuleSymbol: a name imported from a module is its top-level
definition, or one the module re-exports by name (`from .tokens import
Token`) or through a star import (`from .users import *`, read from source),
three packages deep, memoized.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
In a TS/JS module the *Service/*Controller convention picks the file's own
class or the convention file beside it (users.controller.ts → users.service.ts),
never a same-named class elsewhere preferred for its file name; anything
farther is the import resolver's or name matching's.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Astro components are used in Astro markup; a .ts / .d.ts type name sharing a
component's name (Playwright's Page, a declaration file's Image) is no
component.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The middleware/controller/service heuristics took the first same-named node
anywhere; a JS/TS module reaches another file's only through an import or
require (the import resolver's), so they now keep a same-file pick only.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The SwiftUI/UIKit/Vapor resolvers apply to Swift refs only; the shared name
pick never returns the declaring type for an inheritance ref; and the
supertype re-choice prefers the declaring file, then a protocol/interface for
`implements`.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Solidity joins OVERLOADING_LANGUAGES, so retargetSelfOverload moves a call
whose argument count the settled overload cannot take to the one sibling
that can.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
A JS/TS module reaches another file's hook or context only through an import
(already the import resolver's), so resolveHook/resolveContext pick from the
reference's own file alone there; an optional call `f?.(…)` is a bare call.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
R looks a call up among functions only; a calls ref named after a base R
function (c, list, df, …) is refused a variable/constant target that is not
bound to a function literal.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
retargetSelfOverload for Swift matches the call's argument labels against
each same-owner overload's external parameter labels (defaulted and variadic
ones optional), instead of the argument count alone.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The extractor names `extension on X` after X; such a node is never a target,
and its members are out of reach from other files (Dart scopes unnamed
extensions to their library) — before ranking in Strategy 3 and as a veto.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
isJavaTypeVisible (before ranking and as a veto): a top-level type from its
package or a single-type/on-demand import; a nested type from inside its
owner, a subtype (anonymous classes by their $anon supertype), an import, or
written through its owner; constructors follow their type; enum constants
only in their enum, a case label, a static import or through the enum.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
isPhpClassVisible: an unqualified PHP class name means the current
namespace's class or the one a `use` imports (none in the project for a
library's); applied before ranking and as a cross-file veto.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
matchReference refuses a method target for a calls ref from a C file: C has
no methods and cannot call a C++ one.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
isVisibleAcrossFiles (before the same-file shortcut) rejects every Go
candidate for a reference its line writes as `pkg.Name` through an import
from outside the module (stdlib or third-party).
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
In a .kts file, a bare call reaches a method/field/property only when its
owner is no class the project declares (build logic's extensions on Gradle's
types); the old rule let every member through.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
In isRustNameInScope, a type reference written `Self::Name` is in scope only
as a type alias declared in the enclosing impl/trait block above it, and one
written through a generic type parameter (`V::Value`) names no project item.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
isScalaPackageObjectMemberVisible: a member of `package object X` resolves
from its package and those under it, or a file that imports through it;
applied before ranking (so the visible namesake wins) and as a veto.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
An extends/implements ref that settled on the declaring type is re-chosen
among the other types of its name, the one the written qualifier leads to
(owner path plus file package), or none.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
A receiver that is the test's own parameter takes the type its in-reach
fixture returns (`return Cls(…)` or a local assigned `Cls(…)`), so calls on
it resolve on that class, or on nothing when it is a library's; fixtures a
conftest.py star-imports or lists in pytest_plugins are in reach.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
isVisibleAcrossFiles rejects a declaration in a .svelte instance <script> or a
Vue <script setup> from another file; a Svelte <script module>, a plain Vue
<script>, and a type a <script setup> exports stay reachable.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
A JS/TS parameter or plain var/let/const above the reference shadows a
same-named function declared elsewhere in the file, whichever strategy found
it; destructured call results, member calls and followed aliases are left
alone.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
One shared pick behind the Django/FastAPI/Flask, ASP.NET, Gin, SwiftUI/Vapor,
Spring and Rust name heuristics: never a function-local declaration, a type
nested in another file's type, or a node the language keeps out of the
reference's file; the reference's own file first, then its directory (not
Rust), then a conventional folder.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The Rust resolver's handler/service/struct heuristics took the first
same-named item and then checked scope; they now drop items declared inside
a function body and out-of-scope names before choosing, and take the file's
own item first.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Generalizes the collapsed-chain self veto beyond TS/JS this./window. roots: a
call the extractor recorded by its bare name but the source writes as a member
call on anything other than this/self/super is never the calling method; and a
value's initializer never calls the value itself.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The Spring resolver's entity/service/controller name heuristics took the first
same-named class under a conventional folder; they now prefer the ref's own
file, then its package, and never reach another file's nested class by its
bare name.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
A TS/JS call written through this.<field>… or window.<x>… reaches the resolver
by its bare name; it resolves to the calling method only when the field is
declared as the caller's own class. A name-scored receiver guess never lands
on the calling method.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
A block namespace qualifies only its own body (a nested one is Outer.Inner),
mirrored in the kernel; a using names the project's namespace, never another
file's using; a global using is its own project's; a nested type is reached
by bare name only from inside its owner or a type deriving from it, through
any partial part; visible C# types are filtered before ranking.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
A function nested in another function is reachable only from inside it; a
Python name the enclosing function binds is that local's value; a pytest
fixture is a test's parameter only in its own module or under its conftest.
Unreachable same-named functions still count against a lone cross-file guess.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
A lone project method now stands for an untyped receiver's member value only
when the receiver is named after the method's class: netbox's
`device=self.parent.device` model-field reads no longer reach a GraphQL
filter's `device` method.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
A kind-projector placeholder (`Align[Either[A, *]]`, `Functor[Map[K, ?]]`)
reached the resolver as a type reference named `*`, and exact or fuzzy
matching bound it to the one `*` in the project - algebra's
`Signed.Sign.*` operator - 567 times in cats. A symbolic name in a Scala
type now resolves only to a type or type alias of that name (cats'
`F ~> G`), and otherwise to nothing, whatever strategy runs.
cats -567; sttp unchanged.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
A bare C# type name could mean any same-named project type. Newtonsoft's
`async Task` tests (`using System.Threading.Tasks;`) bound `Task` to a test
class `Task` in `Newtonsoft.Json.Tests.Schema` 433 times; AutoMapper's DTOs
in `OmmitedDTOModel3` extended `OmmitedDatabaseModel3`'s `BaseEntity`;
Newtonsoft's `BindingFlags` went to its portable-build polyfill.
A type in namespace N is now in reach of a file whose code runs in N or a
namespace inside it, or that imports N: its `using N;`, any file's
`global using N;`, the project files' `<Using Include="N" />`, the SDK's
implicit usings when `<ImplicitUsings>` is on (serilog's own
`System.TimeProvider` polyfill is seen through them), or an alias naming
the type (`using License = AutoMapper.Licensing.License;`). A type in the
global namespace is seen everywhere; qualified names are not judged.
Newtonsoft -529, AutoMapper -72, eShop -4; serilog, CleanArchitecture
unchanged.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The Rust scope rule (#2124) only checked prelude names; every other bare
name could mean any same-named project item, and a name after any path
(`io::Result`) could mean any at all. The Rust framework resolver's
PascalCase / handler / service patterns bound names with no scope check at
0.7-0.8. tokio's 1,221 `io::Result<...>` went to a private
`runtime::task::Result` alias, 642 `Context<'_>` (from `use
std::task::{Context, Poll}`) to `runtime::context::Context`.
- A type or function from another file is in scope only through a `use`
that binds it (its leaf, `as` alias, or `{self}`) or a glob over its
module; methods and fields (reached through a value), import refs and
module / file targets are unaffected.
- A name a file imports from outside the project - `std` / `core` /
`alloc`, or a crate its Cargo manifests declare as a dependency - is that
outside item. (An inline `mod support { pub mod panic; }` is the
project's.)
- A path names its module: `seg::Name` reaches an item of module `seg`;
a path rooted at std (`std::io::Error`) or at an outside import (`io::`
under `use std::io`) reaches none; `crate::` / `self::` / `super::` and a
project crate's name (`clap::Command`, re-exported) look it up as before.
The path is read anywhere on the line, not only at the reference's column.
- The framework resolver's patterns apply the same check.
tokio -3008 +610, serde -792 +650, ripgrep -602 +247, axum -453 +186, clap
-342 +32, bat -38 +9. Sampled losses: std / core / futures / syn / http /
anyhow imports and paths, associated types (`S::Ok`, `S::Error`, `V::Value`,
`Fut::Output`); gains are same-module items the old first match hid.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
#2212 moved a method's call to its own name onto the sibling overload the
arguments fit. The same holds for every caller: a match landing on an
overload whose parameters cannot take the call's arguments moves to the one
same-owner overload they fit - commons-lang's
`HashCodeBuilder.reflectionHashCode(this)` from the three-parameter overload
indexed first to the `(Object, String...)` one, Newtonsoft's
`SetToken(token, value)` from `SetToken(token)`, halo's four-argument
`menuItem(...)` from the one-argument `menuItem`.
Overload sets and arities are read once per target node, and a target with
no same-owner sibling costs one lookup, so indexing time is unchanged
(commons-lang 4.67s vs 4.70s, Newtonsoft 4.04s vs 4.05s, wasm both arms).
C++ keeps only the self-call case: its overload sets (templates, SFINAE
priority tags, `data()` on any container) move targets unreliably.
Targets moved between same-named overloads: commons-lang 2,334, Newtonsoft
697, halo 286, gson 232, okhttp 188, Alamofire 50; nlohmann json and fmt
unchanged. Edge counts unchanged.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
A method that delegates to another overload of itself -
`toInstant(instant)` returning `toInstant(instant, Instant.EPOCH)`,
`DeserializeXNode(value)` returning `DeserializeXNode(value, null)` - bound to
itself, since every overload shares the name: the fuller overload never
listed its convenience overloads among its callers, and its impact missed
them.
When a name match lands on the calling method itself, in a language that
overloads by arity (C#, Java, Kotlin, Swift, C++, Scala, Dart, VB.NET), the
call's argument count is read and compared with the method's parameters
(defaults and varargs / `params` / `...` counted); if they cannot take it,
the one same-owner overload they fit is the target. Real recursion
(`depth(n - 1)`) keeps its self-edge.
Self-loops -> overload edges: commons-lang 637 -> 457, Newtonsoft 303 -> 196,
halo 173 -> 116, okhttp 248 -> 208, Alamofire 147 -> 120, gson 74 -> 55,
AutoMapper 71 -> 57 (edge counts unchanged; overloads share a qualified
name, so only the target moves).
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The React resolver's `languages` gates its route extraction, not its
resolve(): framework resolvers see every language's references. Its
component rule was already JSX-only, but its hook (`use...`) and context
(`...Context` / `...Provider`) rules were not: in halo - a Spring app whose
UI package makes React detected - 209 Java import edges (`SecurityContext`,
`ApplicationContext`, `ObjectProvider`, `DirtiesContext`...) were resolved by
it onto import nodes. It now answers only JavaScript / TypeScript / TSX /
JSX references.
halo -209 +3 (a Java test's `responseContext()` helper now resolves to
itself); trpc, excalidraw, react-redux-realworld, bulletproof-react,
react-native-reusables unchanged.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Framework resolvers see every reference of every language, and the Vue
resolver had no language guard: its PascalCase-component rule took
mealie's Python `QueryFilterBuilder(...)` (an unresolved import) to the
`QueryFilterBuilder.vue` component at 0.8, and its macro / auto-import rules
matched any language's `ref(...)` or `computed(...)`. It now answers only
refs from vue / javascript / typescript / tsx / jsx files.
mealie: 6 Python calls reroute to the Python class; halo, elk, element-plus
unchanged.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
A test suite is not linked into the program, so a name match from
production code into one is coincidence - but only Strategy 3's receiver
guess (#2171) ruled it out. Now no strategy's name match reaches a symbol
in a test suite from a non-test file: a test source set (`src/test/`,
`jvmTest/`), a `tests/` / `__tests__/` / `spec/` / `e2e/` directory, a
`FooTest.kt` / `test_foo.py` / `foo.test.ts` / `foo_spec.rb` file.
Test-support code a project ships - `testing/`, `fakes/`, `mocks/`, a
`*-test` module - stays in reach, and `…Spec.java` (halo's `IndexSpecs`,
okhttp's `ConnectionSpec`), `post-spec.ts` models and `useTests.ts` hooks
are not test suites.
typeorm -64 (`Record<K, V>` -> a test entity), okhttp -164 (117 sample
`@Override` -> a test's nested `Override`), kotlinx.coroutines -318
(`import kotlinx.coroutines.*` onto one test file's package node), sttp -62,
Exposed -92, halo 0, element-plus -36 (`isClient` -> a test's vueuse mock),
excalidraw -10 (`actionManager.executeAction` -> the test `API` helper),
tokio -30, trpc -36, AutoMapper -37, netbox -22, cats -21, mealie -10,
pytest -8, Alamofire -7; zod, eShop, react-native-reusables unchanged.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
`answers in under 100 ms` took one wall-clock sample while the rest of the
suite ran in parallel, and failed under that load at 250-430 ms (three
times in one day of full-suite runs) while passing alone. It now takes the
fastest of five warm requests: contention is gone from at least one, and a
real slowdown is slow on every one.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Dart joins Rust/Go/Kotlin/C# with a standard-method list (String, List,
Iterable, Map, Set: endsWith, contains, forEach, putIfAbsent, where,
sublist...): a guess onto a project method of such a name needs a receiver
named after its owner. And a Dart extension's owner, for that naming, is the
type it is `on` - getx's `ext.endsWith(".avi")` on a String shared the word
`Ext` with `extension RxStringExt on Rx<String>`, none with `Rx<String>`.
getx -36 (`RxStringExt::endsWith` x23, IOHttpResponse::join/toList),
riverpod -37 (`UnmodifiableMap::putIfAbsent/addAll` on plain maps), bloc -18
(`ignore.contains(...)` -> GithubCache, a Map's `forEach` -> _Emitter; bloc's
untyped `emit.forEach(...)` handler lambdas lose their lucky guess too).
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
#2172 made the members of every type a project function type takes as a
receiver reachable from any bare call, since it could not tell which
lambda a call is in. With several such types in reach, proximity chose:
koin's `single { C51(get(), get()) }` and `Scope.new(...)`'s `get()` went to
`Koin.get` (koin also has `Koin.() -> ...` lambdas), 2,190 times.
- A lambda's receiver is read from the function it is passed to: the type
before `.(` in its last parameter's function type, directly or through a
typealias (`definition: Definition<T>`, `typealias Definition<T> =
Scope.(ParametersHolder) -> T`), when every project function of that name
agrees. The brace frames put it in the lambda's hierarchy.
- Of the members a bare call can reach, those its lexical hierarchy reaches -
its class, an extension's receiver, the lambda it is in - come before those
only the project-wide receiver set reaches.
koin: `get()` -> Scope (2,184), `viewModel` in `scope { }` -> ScopeDSL,
`modules(...)` in `startKoin { }` -> KoinApplication. Exposed: `varchar(...)`,
`integer`, `reference`, `datetime` in a table object -> Table's (were a
test table's same-named property). kotlinx.coroutines: `launch { }` ->
CoroutineScope.launch (was a test DSL's). Edge counts ~unchanged (targets
move): koin, Exposed, okhttp, coroutines, okio; nowinandroid, moshi
unchanged.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The declared-member receiver inference #2171 gave C#, Java and Kotlin now
reads Swift too: `var cache: ImageCache!`, `let storage: DiskStorage.Backend<Data>`,
`self.x` as well as `x`, a function's own `let` shadowing the property. The
dotted-call path types the receiver from it, and a chained bare call keeps
only members of that type or its supertypes / protocols.
Kingfisher: `cache.imageCachedType(forKey:)` -> ImageCache's (was a test
subclass's override), `storage.store/value/isCached` -> DiskStorage.Backend,
`manager.retrieveImage` -> KingfisherManager (was a test double), DispatchQueue
`ioQueue.async` no longer a project method. realm-swift: `List::append`,
`RealmCollection::sum/index` (were Objective-C RLMArray selectors); vapor:
`self.storage.write` -> NIOHTTPBodyWriterStorage.
Kingfisher -100 +179, realm-swift -108 +203, Alamofire -16 +54, vapor -15
+10, IceCubesApp -6 +5; Newtonsoft.Json, okhttp unchanged.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
A vendored minified script (`*.min.js`, or a script of a few enormous lines
- the same detection #2122 uses to rank them last) keeps mangled one-letter
names, so a name match from any other file is coincidence: healthchecks'
369 `$(...)` jQuery calls went to a helper inside bootstrap-native.min.js,
TestBox's popper.min.js to jquery.min.js internals, flaskbb's docs script
to its vendors bundle. Such files' symbols are no longer visible across
files by name; calls inside a bundle still resolve.
healthchecks -460, flaskbb -48, TestBox -36; bat, lodash, minimal-mistakes,
netbox, express, excalidraw unchanged.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
A chained Swift call accepted any same-named member unless its name was a
standard-library one: vapor's `JSONDecoder().decode(...)` and even its own
`URLQueryDecoder().decode(...)` went to `ClientRequest._URLQueryContainer
.decode`, IceCubes' `JSONEncoder().encode(self)` to a filter's `encode`,
realm's `Realm().create(...)` to a test object's `create`.
When the link before the call is a constructor - `TypeName(...)` with flat
arguments - the member must belong to that type or a supertype / protocol
the project gives it; an outside type (JSONDecoder) keeps only the
project's extensions of it. A capitalized C function
(`RLMObjectBaseObjectSchema(obj)!`) constructs nothing and is left alone.
vapor -63 +62 (`URLQueryDecoder::decode`, `URLEncodedFormParser::parse`),
IceCubesApp -23 +1, realm-swift -19 +19 (`Realm::create`), Alamofire -1;
Kingfisher unchanged.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
- A bare Lua call cannot reach a table's method (`function M.x`,
`function M:x`) without its table: kong's 118 `error(...)` calls went to
its response PDK's `_RESPONSE.error`, 111 to a mock's `error`, busted's
`setup`/`teardown` to perf helpers' and factories'.
- A bare call to a Lua global (`ipairs`, `error`, `require`, busted's
`describe`/`it`/`setup`...) is Lua's unless the file defines its own
function of that name: telescope's 120 `for _, v in ipairs(...)` went to a
linked list's `ipairs` method, apisix's 36 `require(...)` to a wasm
module's `_M.require`.
- A function's own locals are not nodes, so the alias reader now reads
`local x = ...` from source above the call within its function, and a
member of a host global table (`kong.request.get_query`) resolves to the
one method of a table named after its holder (`_REQUEST`). kong's
`local clear_header = kong.service.request.clear_header` had resolved to
the RESPONSE module's - now nothing, correctly.
telescope -129, kong -516 +58 (indexing 4.7s -> 3.5s), apisix -57 +18,
lua-resty-core -4, roact -3 +1.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
`fmt::format("{}", x)` resolves through the macro-namespace matcher
(#2176), which took the first same-named function of the namespace -
color.h's `format(const text_style&, format_string, T&&...)` - for all of
fmt's 1,400 `fmt::format` calls, and likewise `print`, `format_to`,
`vformat`.
Among an overload set the call's arguments are now read (to a dozen lines)
and each overload's parameter list from source (C++ signatures are empty):
an argument count outside the parameters' is out; a string-literal argument
fits a parameter that names a string type best, a template parameter
(`const S&`) less, anything else not; a narrow literal never fits a wide
parameter (`wformat_string`, `wstring_view`) nor a wide one a narrow one.
`...` inside `format_string<T...>` is not a pack.
fmt: `format` -> format.h (1,363) and xchar.h for `L"..."` (57),
`format_to`/`print` -> core.h, `vformat` -> format-inl.h; spdlog's bundled
fmt the same; pybind11's `py::set()` -> pytypes.h's `set` class. json,
rapidjson, leveldb unchanged. Edge counts unchanged (targets only).
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The Express-style route extractor attributed an inline arrow handler's calls
to the route by bare name - `c.text('Hello')` became `text` - so each
matched whatever same-named symbol the project had: hono's 419 `c.text(...)`
routes called its client's `ClientResponse.text`, `c.html(...)` its `html`
helper, `c.req.parseBody()` a utility `parseBody`. A member call now keeps
its receiver (`c.text`, `userService.lookup`) and resolves like any member
call; a member of an expression (`a.b().c(`) names nothing to follow. Both
the plain and the `router.route(...).get(...)` forms share the scanner.
hono -538 +71 (`Context::text` / `Context::html` where the receiver
resolves; `c.req.*` 3-link chains now stay unresolved like any other
untyped chain); express, react-redux-realworld, trpc, kit, BookStack
unchanged.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
A later link of a Scala chain (`arbitrary[Int].map { ... }`) accepted any
type or object candidate: alleycats' `object map`, cats' `instances.map`,
`syntax.flatMap` and `show` objects took 418 such calls. A type or object is
now a chain link only when the receiver names what holds it - its outer type,
or for a top-level one its file's package (Scala qualified names leave the
package out): `sttp.client4.Response(...)`, `fs2.concurrent.Topic(1)`.
cats -418, sttp -5 (akka's `FormData.BodyPart`, a Java `_.stream()`), fs2
unchanged.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
A bare Python call whose name the enclosing function binds - an assignment
(`view = SomeView.as_view()`, tuple and annotated forms), a parameter, a
`for` / `with ... as` / `except ... as` target - or the module binds at top
level, no longer resolves to a same-named function in another file. DRF's
tests write `view = X.as_view()` then `view(request)`: 118 such calls went
to one test file's `def view`. Read from code only (docstrings and comments
blanked), and an imported name is left to the import. A pytest fixture
(`@pytest.fixture`, or anything in a conftest.py) is still what a test's
parameter of that name calls.
django-rest-framework -122, pytest -25 (`func` / `xfail` params and
aliases), allauth -12 (`serialize_instance = get_adapter().serialize_instance`),
netbox -6 (migrations' `apps.get_model(...)`), mealie -3, flask -2;
healthchecks, flaskbb, httpx unchanged.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Strategy 3's scoring already skipped a test double (`Mock…`, `Fake…`,
`Stub…`, `Dummy…`, `Spy…`) the receiver and the calling file never name
(#2175), but the unique-method shortcut before it did not: django-allauth's
`resp.json()` on a Django test-client response went to `MockedResponse.json`
193 times, as the project's one `json`. The shortcut now applies the same
rule.
django-allauth -193, pytest -15 (`MockTiming`), mealie -8 (`FakeSession`,
`_FakePostClient`); netbox, healthchecks, typeorm, eShop, BookStack
unchanged.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>