Changeset View
Changeset View
Standalone View
Standalone View
swh/storage/interface.py
Show First 20 Lines • Show All 1,061 Lines • ▼ Show 20 Lines | ) -> PagedResult[Origin]: | ||||
Yields: | Yields: | ||||
PagedResult of Origin | PagedResult of Origin | ||||
""" | """ | ||||
... | ... | ||||
@deprecated | @deprecated | ||||
@remote_api_endpoint("origin/count") | @remote_api_endpoint("origin/count") | ||||
def origin_count(self, url_pattern, regexp=False, with_visit=False): | def origin_count( | ||||
self, url_pattern: str, regexp: bool = False, with_visit: bool = False | |||||
) -> int: | |||||
"""Count origins whose urls contain a provided string pattern | """Count origins whose urls contain a provided string pattern | ||||
or match a provided regular expression. | or match a provided regular expression. | ||||
The pattern search in origin urls is performed in a case insensitive | The pattern search in origin urls is performed in a case insensitive | ||||
way. | way. | ||||
Args: | Args: | ||||
url_pattern (str): the string pattern to search for in origin urls | url_pattern (str): the string pattern to search for in origin urls | ||||
regexp (bool): if True, consider the provided pattern as a regular | regexp (bool): if True, consider the provided pattern as a regular | ||||
▲ Show 20 Lines • Show All 216 Lines • Show Last 20 Lines |