|
27 | 27 | from adabot import github_requests as github
|
28 | 28 | from adabot import travis_requests as travis
|
29 | 29 | from adabot import pypi_requests as pypi
|
30 |
| -from adabot.lib.common_funcs import * |
| 30 | +from adabot.lib import common_funcs |
31 | 31 |
|
32 | 32 |
|
33 | 33 | # Define constants for error strings to make checking against them more robust:
|
@@ -169,7 +169,7 @@ def validate_repo_state(self, repo):
|
169 | 169 | errors.append(ERROR_MISSING_LICENSE)
|
170 | 170 | if not repo["permissions"]["push"]:
|
171 | 171 | errors.append(ERROR_MISSING_LIBRARIANS)
|
172 |
| - if not is_repo_in_bundle(full_repo["clone_url"], self.bundle_submodules) and \ |
| 172 | + if not common_funcs.is_repo_in_bundle(full_repo["clone_url"], self.bundle_submodules) and \ |
173 | 173 | not repo["name"] in BUNDLE_IGNORE_LIST: # Don't assume the bundle will
|
174 | 174 | # bundle itself and possibly
|
175 | 175 | # other repos.
|
@@ -588,9 +588,9 @@ def validate_readthedocs(self, repo):
|
588 | 588 | return [ERROR_RTD_SUBPROJECT_FAILED]
|
589 | 589 | rtd_subprojects = {}
|
590 | 590 | for subproject in rtd_response.json()["subprojects"]:
|
591 |
| - rtd_subprojects[sanitize_url(subproject["repo"])] = subproject |
| 591 | + rtd_subprojects[common_funcs.sanitize_url(subproject["repo"])] = subproject |
592 | 592 |
|
593 |
| - repo_url = sanitize_url(repo["clone_url"]) |
| 593 | + repo_url = common_funcs.sanitize_url(repo["clone_url"]) |
594 | 594 | if repo_url not in rtd_subprojects:
|
595 | 595 | return [ERROR_RTD_SUBPROJECT_MISSING]
|
596 | 596 |
|
@@ -789,6 +789,6 @@ def validate_in_pypi(self, repo):
|
789 | 789 | if not (repo["owner"]["login"] == "adafruit" and
|
790 | 790 | repo["name"].startswith("Adafruit_CircuitPython")):
|
791 | 791 | return []
|
792 |
| - if not repo_is_on_pypi(repo): |
| 792 | + if not common_funcs.repo_is_on_pypi(repo): |
793 | 793 | return [ERROR_NOT_ON_PYPI]
|
794 | 794 | return []
|
0 commit comments