| Conditions | 2 |
| Total Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | import abc |
||
| 25 | def dispatch(self, path: str, method: str) -> Callable: |
||
| 26 | match_result = self._schema.match(path) |
||
| 27 | endpoint_kwargs = match_result['kwargs'] |
||
| 28 | endpoint_obj = match_result['endpoint'](**endpoint_kwargs) |
||
| 29 | if self._is_accepted_method(endpoint_obj, method): |
||
| 30 | return getattr(endpoint_obj, method.lower()) |
||
| 31 | else: |
||
| 32 | raise exceptions.MethodNotAllowed() |
||
| 33 | |||
| 36 |