(self)
| 61 | self.compileEventPathPatterns() |
| 62 | |
| 63 | def compileEventPathPatterns(self): |
| 64 | # We'll run a single format, to get the final event path tuple |
| 65 | pathPatterns = self.eventPathPatterns |
| 66 | if isinstance(pathPatterns, str): |
| 67 | pathPatterns = pathPatterns.split() |
| 68 | warn_deprecated( |
| 69 | '4.3.0', |
| 70 | 'ResourceType.eventPathPatterns as a multiline string is deprecated. Use ' |
| 71 | 'eventPathPatterns as a list of strings instead.', |
| 72 | ) |
| 73 | identifiers = re.compile(r':([^/]*)') |
| 74 | for i, pp in enumerate(pathPatterns): |
| 75 | pp = identifiers.sub(r'{\1}', pp) |
| 76 | if pp.startswith("/"): |
| 77 | pp = pp[1:] |
| 78 | pathPatterns[i] = pp |
| 79 | self.eventPaths = pathPatterns |
| 80 | |
| 81 | @functools.lru_cache(1) # noqa: B019 |
| 82 | def getEndpoints(self): |
no test coverage detected