(self, api_function)
| 426 | self.route["exclude"] = (exclude,) if not isinstance(exclude, (list, tuple)) else exclude |
| 427 | |
| 428 | def __call__(self, api_function): |
| 429 | api = self.route.get("api", hug.api.from_object(api_function)) |
| 430 | (interface, callable_method) = self._create_interface( |
| 431 | api, api_function, catch_exceptions=False |
| 432 | ) |
| 433 | for version in self.route.get("versions", (None,)): |
| 434 | for exception in self.route["exceptions"]: |
| 435 | api.http.add_exception_handler(exception, interface, version) |
| 436 | |
| 437 | return callable_method |
| 438 | |
| 439 | def _create_interface(self, api, api_function, catch_exceptions=False): |
| 440 | interface = hug.interface.ExceptionRaised(self.route, api_function, catch_exceptions) |
nothing calls this directly
no test coverage detected