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.
@@ -337,10 +337,12 @@ def _validate_travis_yml(self, repo, travis_yml_file_info):
337
337
338
338
if not pylint_version :
339
339
errors .append (ERROR_PYLINT_VERSION_NOT_FIXED )
340
- elif pylint_version .startswith ("1." ):
341
- errors .append (ERROR_PYLINT_VERSION_VERY_OUTDATED )
342
- elif pylint_version != self .latest_pylint :
343
- errors .append (ERROR_PYLINT_VERSION_NOT_LATEST )
340
+ # disabling below for now, since we know all pylint versions are old
341
+ # will re-enable once efforts are underway to update pylint
342
+ #elif pylint_version.startswith("1."):
343
+ # errors.append(ERROR_PYLINT_VERSION_VERY_OUTDATED)
344
+ #elif pylint_version != self.latest_pylint:
345
+ # errors.append(ERROR_PYLINT_VERSION_NOT_LATEST)
344
346
345
347
return errors
346
348
@@ -586,9 +588,9 @@ def validate_readthedocs(self, repo):
586
588
return [ERROR_RTD_SUBPROJECT_FAILED ]
587
589
rtd_subprojects = {}
588
590
for subproject in rtd_response .json ()["subprojects" ]:
589
- rtd_subprojects [sanitize_url (subproject ["repo" ])] = subproject
591
+ rtd_subprojects [common_funcs . sanitize_url (subproject ["repo" ])] = subproject
590
592
591
- repo_url = sanitize_url (repo ["clone_url" ])
593
+ repo_url = common_funcs . sanitize_url (repo ["clone_url" ])
592
594
if repo_url not in rtd_subprojects :
593
595
return [ERROR_RTD_SUBPROJECT_MISSING ]
594
596
@@ -608,9 +610,10 @@ def validate_readthedocs(self, repo):
608
610
latest_release = github .get ("/repos/{}/releases/latest" .format (repo ["full_name" ]))
609
611
if not latest_release .ok :
610
612
errors .append (ERROR_GITHUB_RELEASE_FAILED )
611
- else :
612
- if latest_release .json ()["tag_name" ] not in [tag ["verbose_name" ] for tag in valid_versions ["versions" ]]:
613
- errors .append (ERROR_RTD_MISSING_LATEST_RELEASE )
613
+ # disabling this for now, since it is ignored and always fails
614
+ #else:
615
+ # if latest_release.json()["tag_name"] not in [tag["verbose_name"] for tag in valid_versions["versions"]]:
616
+ # errors.append(ERROR_RTD_MISSING_LATEST_RELEASE)
614
617
615
618
# There is no API which gives access to a list of builds for a project so we parse the html
616
619
# webpage.
@@ -786,6 +789,6 @@ def validate_in_pypi(self, repo):
786
789
if not (repo ["owner" ]["login" ] == "adafruit" and
787
790
repo ["name" ].startswith ("Adafruit_CircuitPython" )):
788
791
return []
789
- if not repo_is_on_pypi (repo ):
792
+ if not common_funcs . repo_is_on_pypi (repo ):
790
793
return [ERROR_NOT_ON_PYPI ]
791
794
return []
0 commit comments