chore: tighten upkeep boundaries and static checks
prd-number-check / require-numbered-prds (pull_request) Successful in 8s
test / integration-docker (pull_request) Successful in 12s
test / unit (pull_request) Successful in 49s
test / coverage (pull_request) Successful in 15s
tracker-policy-pr / check-pr (pull_request) Successful in 5s
test / integration-docker (push) Successful in 13s
test / unit (push) Successful in 48s
lint / lint (push) Successful in 56s
Update Quality Badges / update-badges (push) Successful in 50s
test / coverage (push) Successful in 13s
prd-number-check / require-numbered-prds (pull_request) Successful in 8s
test / integration-docker (pull_request) Successful in 12s
test / unit (pull_request) Successful in 49s
test / coverage (pull_request) Successful in 15s
tracker-policy-pr / check-pr (pull_request) Successful in 5s
test / integration-docker (push) Successful in 13s
test / unit (push) Successful in 48s
lint / lint (push) Successful in 56s
Update Quality Badges / update-badges (push) Successful in 50s
test / coverage (push) Successful in 13s
This commit was merged in pull request #491.
This commit is contained in:
@@ -21,9 +21,12 @@ class TestCliBackendBoundaries(unittest.TestCase):
|
||||
for path in (ROOT / "bot_bottle" / "cli").rglob("*.py"):
|
||||
tree = ast.parse(path.read_text(), filename=str(path))
|
||||
for node in ast.walk(tree):
|
||||
module = node.module if isinstance(node, ast.ImportFrom) else None
|
||||
if module and module.startswith(forbidden):
|
||||
violations.append(f"{path.relative_to(ROOT)}:{node.lineno}: {module}")
|
||||
if isinstance(node, ast.ImportFrom):
|
||||
module = node.module
|
||||
if module and module.startswith(forbidden):
|
||||
violations.append(
|
||||
f"{path.relative_to(ROOT)}:{node.lineno}: {module}"
|
||||
)
|
||||
if isinstance(node, ast.Import):
|
||||
violations.extend(
|
||||
f"{path.relative_to(ROOT)}:{node.lineno}: {alias.name}"
|
||||
|
||||
Reference in New Issue
Block a user