MCPcopy
hub / github.com/pallets/flask / make_setup_state

Method make_setup_state

src/flask/sansio/blueprints.py:246–253  ·  view source on GitHub ↗

Creates an instance of :meth:`~flask.blueprints.BlueprintSetupState` object that is later passed to the register callback functions. Subclasses can override this to return a subclass of the setup state.

(
        self, app: App, options: dict[str, t.Any], first_registration: bool = False
    )

Source from the content-addressed store, hash-verified

244 self.record(update_wrapper(wrapper, func))
245
246 def make_setup_state(
247 self, app: App, options: dict[str, t.Any], first_registration: bool = False
248 ) -> BlueprintSetupState:
249 """Creates an instance of :meth:`~flask.blueprints.BlueprintSetupState`
250 object that is later passed to the register callback functions.
251 Subclasses can override this to return a subclass of the setup state.
252 """
253 return BlueprintSetupState(self, app, options, first_registration)
254
255 @setupmethod
256 def register_blueprint(self, blueprint: Blueprint, **options: t.Any) -> None:

Callers 1

registerMethod · 0.95

Calls 1

BlueprintSetupStateClass · 0.85

Tested by

no test coverage detected