make_context() — flask Function Reference
Architecture documentation for the make_context() function in cli.py from the flask codebase.
Entity Profile
Dependency Diagram
graph TD 57df2c73_65cb_ce7f_551b_d57f6d93eddf["make_context()"] ee9fbc8f_42bd_3ef5_a80f_72abfe054c0b["FlaskGroup"] 57df2c73_65cb_ce7f_551b_d57f6d93eddf -->|defined in| ee9fbc8f_42bd_3ef5_a80f_72abfe054c0b style 57df2c73_65cb_ce7f_551b_d57f6d93eddf fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/flask/cli.py lines 657–676
def make_context(
self,
info_name: str | None,
args: list[str],
parent: click.Context | None = None,
**extra: t.Any,
) -> click.Context:
# Set a flag to tell app.run to become a no-op. If app.run was
# not in a __name__ == __main__ guard, it would start the server
# when importing, blocking whatever command is being called.
os.environ["FLASK_RUN_FROM_CLI"] = "true"
if "obj" not in extra and "obj" not in self.context_settings:
extra["obj"] = ScriptInfo(
create_app=self.create_app,
set_debug_flag=self.set_debug_flag,
load_dotenv_defaults=self.load_dotenv,
)
return super().make_context(info_name, args, parent=parent, **extra)
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does make_context() do?
make_context() is a function in the flask codebase, defined in src/flask/cli.py.
Where is make_context() defined?
make_context() is defined in src/flask/cli.py at line 657.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free