MCPcopy Create free account
hub / github.com/pallets/quart / make_context

Method make_context

src/quart/cli.py:546–563  ·  view source on GitHub ↗
(
        self,
        info_name: str | None,
        args: list[str],
        parent: click.Context | None = None,
        **extra: Any,
    )

Source from the content-addressed store, hash-verified

544 return sorted(rv)
545
546 def make_context(
547 self,
548 info_name: str | None,
549 args: list[str],
550 parent: click.Context | None = None,
551 **extra: Any,
552 ) -> click.Context:
553 # Attempt to load .env and .quartenv files. The --env-file
554 # option can cause another file to be loaded.
555 if get_load_dotenv(self.load_dotenv):
556 load_dotenv()
557
558 if "obj" not in extra and "obj" not in self.context_settings:
559 extra["obj"] = ScriptInfo(
560 create_app=self.create_app, set_debug_flag=self.set_debug_flag
561 )
562
563 return super().make_context(info_name, args, parent=parent, **extra)
564
565 def parse_args(self, ctx: click.Context, args: list[str]) -> list[str]:
566 if not args and self.no_args_is_help:

Callers

nothing calls this directly

Calls 3

get_load_dotenvFunction · 0.85
load_dotenvFunction · 0.85
ScriptInfoClass · 0.85

Tested by

no test coverage detected