Path 1: 45 calls (0.51)

Blueprint (45)

Flask (45)

{'url_prefix': '/py'} (19) {'url_prefix': '/bp'} (10) {'url_prefix': '/parent/child', 'name_prefix': 'parent'} (5) {'url_prefix': '/parent'} (3) dict ...

True (42) False (3)

1def __init__(
2        self,
3        blueprint: Blueprint,
4        app: Flask,
5        options: t.Any,
6        first_registration: bool,
7    ) -> None:
8        #: a reference to the current application
9        self.app = app
10
11        #: a reference to the blueprint that created this setup state.
12        self.blueprint = blueprint
13
14        #: a dictionary with all options that were passed to the
15        #: :meth:`~flask.Flask.register_blueprint` method.
16        self.options = options
17
18        #: as blueprints can be registered multiple times with the
19        #: application and not everything wants to be registered
20        #: multiple times on it, this attribute can be used to figure
21        #: out if the blueprint was registered in the past already.
22        self.first_registration = first_registration
23
24        subdomain = self.options.get("subdomain")
25        if subdomain is None:
26            subdomain = self.blueprint.subdomain
27
28        #: The subdomain that the blueprint should be active for, ``None``
29        #: otherwise.
30        self.subdomain = subdomain
31
32        url_prefix = self.options.get("url_prefix")
33        if url_prefix is None:
34            url_prefix = self.blueprint.url_prefix
35        #: The prefix that should be used for all URLs defined on the
36        #: blueprint.
37        self.url_prefix = url_prefix
38
39        self.name = self.options.get("name", blueprint.name)
40        self.name_prefix = self.options.get("name_prefix", "")
41
42        #: A dictionary with URL defaults that is added to each and every
43        #: URL that was defined with the blueprint.
44        self.url_defaults = dict(self.blueprint.url_values_defaults)
45        self.url_defaults.update(self.options.get("url_defaults", ()))
            

Path 2: 40 calls (0.45)

Blueprint (39) test_default_static_max_age..MyBlueprint (1)

Flask (40)

{} (34) {'url_prefix': None} (2) {'name_prefix': 'parent'} (1) {'name': 'again'} (1) {'name': 'alt'} (1) {'cli_group': 'late_registration'} (1)

True (39) False (1)

1def __init__(
2        self,
3        blueprint: Blueprint,
4        app: Flask,
5        options: t.Any,
6        first_registration: bool,
7    ) -> None:
8        #: a reference to the current application
9        self.app = app
10
11        #: a reference to the blueprint that created this setup state.
12        self.blueprint = blueprint
13
14        #: a dictionary with all options that were passed to the
15        #: :meth:`~flask.Flask.register_blueprint` method.
16        self.options = options
17
18        #: as blueprints can be registered multiple times with the
19        #: application and not everything wants to be registered
20        #: multiple times on it, this attribute can be used to figure
21        #: out if the blueprint was registered in the past already.
22        self.first_registration = first_registration
23
24        subdomain = self.options.get("subdomain")
25        if subdomain is None:
26            subdomain = self.blueprint.subdomain
27
28        #: The subdomain that the blueprint should be active for, ``None``
29        #: otherwise.
30        self.subdomain = subdomain
31
32        url_prefix = self.options.get("url_prefix")
33        if url_prefix is None:
34            url_prefix = self.blueprint.url_prefix
35        #: The prefix that should be used for all URLs defined on the
36        #: blueprint.
37        self.url_prefix = url_prefix
38
39        self.name = self.options.get("name", blueprint.name)
40        self.name_prefix = self.options.get("name_prefix", "")
41
42        #: A dictionary with URL defaults that is added to each and every
43        #: URL that was defined with the blueprint.
44        self.url_defaults = dict(self.blueprint.url_values_defaults)
45        self.url_defaults.update(self.options.get("url_defaults", ()))
            

Path 3: 4 calls (0.04)

Blueprint (4)

Flask (4)

{'subdomain': 'api'} (1) {'subdomain': 'api', 'name_prefix': 'parent'} (1) {'subdomain': 'parent'} (1) {'subdomain': 'api.parent', 'name_prefix': 'par...

True (4)

1def __init__(
2        self,
3        blueprint: Blueprint,
4        app: Flask,
5        options: t.Any,
6        first_registration: bool,
7    ) -> None:
8        #: a reference to the current application
9        self.app = app
10
11        #: a reference to the blueprint that created this setup state.
12        self.blueprint = blueprint
13
14        #: a dictionary with all options that were passed to the
15        #: :meth:`~flask.Flask.register_blueprint` method.
16        self.options = options
17
18        #: as blueprints can be registered multiple times with the
19        #: application and not everything wants to be registered
20        #: multiple times on it, this attribute can be used to figure
21        #: out if the blueprint was registered in the past already.
22        self.first_registration = first_registration
23
24        subdomain = self.options.get("subdomain")
25        if subdomain is None:
26            subdomain = self.blueprint.subdomain
27
28        #: The subdomain that the blueprint should be active for, ``None``
29        #: otherwise.
30        self.subdomain = subdomain
31
32        url_prefix = self.options.get("url_prefix")
33        if url_prefix is None:
34            url_prefix = self.blueprint.url_prefix
35        #: The prefix that should be used for all URLs defined on the
36        #: blueprint.
37        self.url_prefix = url_prefix
38
39        self.name = self.options.get("name", blueprint.name)
40        self.name_prefix = self.options.get("name_prefix", "")
41
42        #: A dictionary with URL defaults that is added to each and every
43        #: URL that was defined with the blueprint.
44        self.url_defaults = dict(self.blueprint.url_values_defaults)
45        self.url_defaults.update(self.options.get("url_defaults", ()))