Method: flask.blueprints.Blueprint._check_setup_finished
Calls: 361, Exceptions: 0, Paths: 1Back
Path 1: 361 calls (1.0)
'record' (93) 'add_url_rule' (70) 'route' (68) 'record_once' (26) 'register_error_handler' (17) 'errorhandler' (16) 'register_blueprint' (11) 'add_app...
1def _check_setup_finished(self, f_name: str) -> None:
2 if self._got_registered_once:
3 raise AssertionError(
4 f"The setup method '{f_name}' can no longer be called on the blueprint"
5 f" '{self.name}'. It has already been registered at least once, any"
6 " changes will not be applied consistently.\n"
7 "Make sure all imports, decorators, functions, etc. needed to set up"
8 " the blueprint are done before registering it."
9 )