diff --git a/quart_openapi/pint.py b/quart_openapi/pint.py index 1459062..a7c3a84 100644 --- a/quart_openapi/pint.py +++ b/quart_openapi/pint.py @@ -457,6 +457,8 @@ def register(self, app: Pint, first_registration: bool, *, url_prefix: Optional[ """override the base :meth:`~quart.Blueprint.register` method to add the resources to the app registering this blueprint, then call the parent register method """ + if not isinstance(app, Pint): + raise TypeError(f"Please use PintBlueprint with instance of Pint not {type(app)}") prefix = url_prefix or self.url_prefix or '' app._resources.extend([(res, f'{prefix}{path}', methods) for res, path, methods in self._resources]) super().register(app, first_registration, url_prefix=url_prefix)