Repo X-Ray · 05 December 2026, 05:37 · read in 0.8s · nothing was executed

flask

/srv/xela/workspace/.xray-oss/flask

How to run itWhat the code isWhere the risk isWhat the tests cannot seeDead weightDependenciesSecretsMethod and limits
18,392
lines of code
35
source files
48
test files
96%
modules a test can reach
851
commits read
35 days ago
last commit

How to run it

make target

console script

runnable script

What the code is

LanguageFilesLines
Python8318,392
HTML20362
CSS2135
SQL228
Shell17

What to read first

The fewest files that are the only import route into 96% of the code — 23 of 24 files. This is not a ranking, it is a cover: nothing in those 23 files can be reached by an import without passing through one of the entrances below. Each row also names the files the rest of that region depends on most, which is the vocabulary you will be reading it in.

Read this, then what it leads toFiles it opensLines in that regionA test reaches it
1. src/flask/__main__.py
where the program starts
  src/flask/typing.py ← 19 files, 87 lines
  src/flask/wrappers.py ← 11 files, 255 lines
  src/flask/globals.py ← 11 files, 77 lines
239,375no

The modules everything else leans on

Imported by the most files: the load-bearing walls, where a change reaches furthest.

ModuleImported byLinesA test reaches it
src/flask/__init__.py5239yes
src/flask/typing.py2287yes
src/flask/globals.py1777yes
src/flask/wrappers.py12255yes
src/flask/app.py111,686yes
src/flask/helpers.py10679yes
src/flask/testing.py9298yes
src/flask/json/__init__.py8170yes
examples/tutorial/flaskr/db.py756yes
src/flask/sansio/app.py71,014yes
src/flask/cli.py61,126yes
src/flask/sessions.py6385yes

Where the risk is

Churn multiplied by size. A big file that never changes is usually fine; a big file that changes constantly is where the bugs and the arguments live.

FileCommitsLinesMostly written byTested
src/flask/app.py1061,686Author A 65%yes
src/flask/helpers.py71679Author A 63%yes
src/flask/cli.py491,126Author A 65%yes
src/flask/ctx.py34540Author A 79%yes
src/flask/sansio/app.py201,014Author A 65%yes
src/flask/sessions.py31385Author A 81%yes
src/flask/testing.py32298Author A 78%yes
src/flask/blueprints.py47128Author A 45%yes
src/flask/__init__.py6039Author A 87%yes
src/flask/config.py17367Author A 59%yes
src/flask/wrappers.py20255Author A 70%yes
src/flask/templating.py20212Author A 55%yes

The busiest test file is tests/test_basic.py (49 commits) - kept out of the table above so the code that ships comes first.

Bus factor. 2 of the files above were written almost entirely by one person (80% or more of the commits that touched them). If that person is not available, these are the files that will hurt.

Active in the last 90 days: Author A (8)

History read: 851 commits, 8 years ago to 35 days ago. Top committer overall: Author A 57%.

What the tests cannot see

23 of 24 shipped modules are reachable from a test file by import (96%).

5 further files under examples, docs, scripts or benchmarks are not test-reachable either. They are counted apart from the number above, because demo code dragging a healthy repository down tells you nothing.

Reachable means a test imports it, directly or through another module. It is the floor, not coverage: a module can be reachable and still have none of its behaviour exercised. The modules below are the other case - nothing a test loads can even see them, so a green suite says nothing about them.

Dead weight

Read this list with care. This repository loads code at runtime in 3 places where the target is a variable, so a reader like this one cannot know what they load. 0 files were rescued from the list below by resolving the literal globs and module paths that could be resolved.

Nothing unreachable found.

Longest functions

FunctionFileLines
make_responsesrc/flask/app.py:1267141
__init__src/flask/sansio/scaffold.py:75141
__init__src/flask/sansio/app.py:280130
runsrc/flask/app.py:641124
send_filesrc/flask/helpers.py:417124
url_forsrc/flask/app.py:1145121
registersrc/flask/sansio/blueprints.py:273105
test_response_typestests/test_basic.py:114492

10 TODO / FIXME / HACK markers

FileCount
CHANGES.rst7
.github/ISSUE_TEMPLATE/bug-report.md3

Dependencies

Read from pyproject.toml, celery/pyproject.toml, javascript/pyproject.toml, tutorial/pyproject.toml.

Declared but never imported

Dead weight in the install, or a tool that is run rather than imported (formatters, type stubs, test plugins). Check before removing.

ruff tox tox-uv sphinx sphinx-tabs sphinxcontrib-log-cabinet sphinx-autobuild gha-update pre-commit pre-commit-uv mypy pyright types-contextvars types-dataclasses amqp async-timeout billiard click-didyoumean click-plugins click-repl kombu prompt-toolkit pytz redis

Missing, but only for tests, docs or examples

Nothing in the shipped code imports these, so an install will not break - but a fresh contributor running the tests or building the docs will hit them.

docutils packaging namespace site_app site_package installed_package config_package_app config_module_app

Optional by design

Imported only inside try: or a TYPE_CHECKING guard, so the code already handles their absence. Not counted as missing.

_typeshed asgiref click codecs cryptography dotenv readline rlcompleter ssl typing_extensions werkzeug

Secrets

No committed credentials matched the patterns checked.

Patterns covered: AWS keys, private key blocks, GitHub, Slack, Stripe, Google, OpenAI and Anthropic keys, JSON web tokens, and passwords assigned in code. A secret in a format not listed here would not be found, and this does not read the git history.

Method and limits

More measured notes on coding agents: alexenabled.github.io