Parses a URI using the regex given in Appendix B of RFC 3986. (scheme, authority, path, query, fragment) = parse_uri(uri)
(uri: str)
| 37 | |
| 38 | |
| 39 | def parse_uri(uri: str) -> tuple[str, str, str, str, str]: |
| 40 | """Parses a URI using the regex given in Appendix B of RFC 3986. |
| 41 | |
| 42 | (scheme, authority, path, query, fragment) = parse_uri(uri) |
| 43 | """ |
| 44 | match = URI.match(uri) |
| 45 | assert match is not None |
| 46 | groups = match.groups() |
| 47 | return (groups[1], groups[3], groups[4], groups[6], groups[8]) |
| 48 | |
| 49 | |
| 50 | class CacheController: |
no outgoing calls
no test coverage detected
searching dependent graphs…