| Total Complexity | 4 |
| Total Lines | 9 |
| Duplicated Lines | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | import abc |
||
| 7 | class AbstractEndpoint(metaclass=abc.ABCMeta): |
||
| 8 | @property |
||
| 9 | def allowed_methods(self) -> Set[str]: |
||
| 10 | return self.get_allowed_methods() |
||
| 11 | |||
| 12 | @classmethod |
||
| 13 | def get_allowed_methods(cls) -> Set[str]: |
||
| 14 | return { |
||
| 15 | method for method in HTTP_METHODS if hasattr(cls, method.lower()) |
||
| 16 | } |
||
| 17 |