(self, other: URL)
| 190 | self.host_regex = re.compile(f"^{domain}$") |
| 191 | |
| 192 | def matches(self, other: URL) -> bool: |
| 193 | if self.scheme and self.scheme != other.scheme: |
| 194 | return False |
| 195 | if ( |
| 196 | self.host |
| 197 | and self.host_regex is not None |
| 198 | and not self.host_regex.match(other.host) |
| 199 | ): |
| 200 | return False |
| 201 | if self.port is not None and self.port != other.port: |
| 202 | return False |
| 203 | return True |
| 204 | |
| 205 | @property |
| 206 | def priority(self) -> tuple[int, int, int]: |
no outgoing calls