[ty] make implicit submodule imports re-exported by Gankra · Pull Request #21573 · astral-sh/ruff (original) (raw)

@Gankra

@Gankra

@Gankra

@Gankra Gankra added the ty

Multi-file analysis & type inference

label

Nov 21, 2025

@astral-sh-bot

@astral-sh-bot

mypy_primer results

Changes were detected when running on open source projects

anyio (https://github.com/agronholm/anyio)

pyinstrument (https://github.com/joerick/pyinstrument)

bandersnatch (https://github.com/pypa/bandersnatch)

spack (https://github.com/spack/spack)

websockets (https://github.com/aaugustin/websockets)

twine (https://github.com/pypa/twine)

scrapy (https://github.com/scrapy/scrapy)

paasta (https://github.com/yelp/paasta)

graphql-core (https://github.com/graphql-python/graphql-core)

starlette (https://github.com/encode/starlette)

alerta (https://github.com/alerta/alerta)

porcupine (https://github.com/Akuli/porcupine)

check-jsonschema (https://github.com/python-jsonschema/check-jsonschema)

PyGithub (https://github.com/PyGithub/PyGithub)

aiohttp-devtools (https://github.com/aio-libs/aiohttp-devtools)

poetry (https://github.com/python-poetry/poetry)

schemathesis (https://github.com/schemathesis/schemathesis)

dragonchain (https://github.com/dragonchain/dragonchain)

tornado (https://github.com/tornadoweb/tornado)

pandera (https://github.com/pandera-dev/pandera)

cki-lib (https://gitlab.com/cki-project/cki-lib)

vision (https://github.com/pytorch/vision)

mitmproxy (https://github.com/mitmproxy/mitmproxy)

schema_salad (https://github.com/common-workflow-language/schema_salad)

speedrun.com_global_scoreboard_webapp (https://github.com/Avasam/speedrun.com_global_scoreboard_webapp)

scikit-learn (https://github.com/scikit-learn/scikit-learn)

freqtrade (https://github.com/freqtrade/freqtrade)

mkdocs (https://github.com/mkdocs/mkdocs)

pyodide (https://github.com/pyodide/pyodide)

pyppeteer (https://github.com/pyppeteer/pyppeteer)

trio (https://github.com/python-trio/trio)

cloud-init (https://github.com/canonical/cloud-init)

apprise (https://github.com/caronc/apprise)

openlibrary (https://github.com/internetarchive/openlibrary)

meson (https://github.com/mesonbuild/meson)

strawberry (https://github.com/strawberry-graphql/strawberry)

setuptools (https://github.com/pypa/setuptools)

cwltool (https://github.com/common-workflow-language/cwltool)

scikit-build-core (https://github.com/scikit-build/scikit-build-core)

prefect (https://github.com/PrefectHQ/prefect)

bokeh (https://github.com/bokeh/bokeh)

django-stubs (https://github.com/typeddjango/django-stubs)

dd-trace-py (https://github.com/DataDog/dd-trace-py)

zulip (https://github.com/zulip/zulip)

rotki (https://github.com/rotki/rotki)

core (https://github.com/home-assistant/core)

... (truncated 137 lines) ...

No memory usage changes detected ✅

carljm

@carljm

@carljm

Ecosystem looks great to me here -- the few added diagnostics just look like cases where we now have type information instead of Unknown.

@astral-sh-bot

ecosystem-analyzer results

Lint rule Added Removed Changed
unresolved-attribute 0 470 11
unused-ignore-comment 3 4 0
invalid-argument-type 2 2 0
possibly-missing-attribute 4 0 0
invalid-type-form 0 3 0
invalid-assignment 0 1 0
type-assertion-failure 0 1 0
Total 9 481 11

Full report with detailed diff (timing results)

@Gankra

oh THERE's the missing 400 fixes I thought one of my followups would hit!

The one followup I forgot to try 😅

@codspeed-hq

@carljm

WTF, is it a new rule that everything must regress performance on pydantic?

This doesn't even seem to cause any new diagnostics on pydantic...

@carljm

I tried to explore this regression and I can't even reproduce it locally. Locally when I run main vs this branch, single-threaded, on pydantic, with a release build, via hyperfine, I consistently see this branch as a couple percent faster than main. So I'm going to acknowledge the regression and go ahead and land this.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})