Method: flask.app.Flask._check_setup_finished
Calls: 1341, Exceptions: 1, Paths: 2Back
Path 1: 1340 calls (1.0)
'add_url_rule' (839) 'route' (261) 'register_blueprint' (80) 'register_error_handler' (39) 'errorhandler' (36) 'teardown_request' (13) 'before_request...
1def _check_setup_finished(self, f_name: str) -> None:
2 if self._got_first_request:
3 raise AssertionError(
4 f"The setup method '{f_name}' can no longer be called"
5 " on the application. It has already handled its first"
6 " request, any changes will not be applied"
7 " consistently.\n"
8 "Make sure all imports, decorators, functions, etc."
9 " needed to set up the application are done before"
10 " running it."
11 )
Path 2: 1 calls (0.0)
'add_url_rule' (1)
AssertionError (1)
1def _check_setup_finished(self, f_name: str) -> None:
2 if self._got_first_request:
3 raise AssertionError(
4 f"The setup method '{f_name}' can no longer be called"
5 " on the application. It has already handled its first"
6 " request, any changes will not be applied"
7 " consistently.\n"
8 "Make sure all imports, decorators, functions, etc."
9 " needed to set up the application are done before"
10 " running it."
11 )