|
10 | 10 | import typing
|
11 | 11 | from dataclasses import dataclass
|
12 | 12 | from typing import AnyStr, Literal, cast
|
13 |
| - |
14 |
| -from .models.pr_info import PullRequestInfoSpecial |
15 |
| -from .models.pr_json import PullRequestData, PullRequestState |
16 |
| - |
17 |
| -if typing.TYPE_CHECKING: |
18 |
| - from .migrators_types import MigrationUidTypedDict |
19 |
| - |
20 | 13 | from urllib.error import URLError
|
21 | 14 | from uuid import uuid4
|
22 | 15 |
|
|
76 | 69 | sanitize_string,
|
77 | 70 | )
|
78 | 71 |
|
| 72 | +from .migrators_types import MigrationUidTypedDict |
| 73 | +from .models.pr_info import PullRequestInfoSpecial |
| 74 | +from .models.pr_json import PullRequestData, PullRequestState |
| 75 | + |
79 | 76 | logger = logging.getLogger(__name__)
|
80 | 77 |
|
81 | 78 | BOT_HOME_DIR: str = os.getcwd()
|
@@ -793,6 +790,7 @@ def _run_migrator_on_feedstock_branch(
|
793 | 790 |
|
794 | 791 | except (github3.GitHubError, github.GithubException) as e:
|
795 | 792 | # TODO: pull this down into run() - also check the other exceptions
|
| 793 | + # TODO: continue here, after that run locally and add tests, backend should be injected into run |
796 | 794 | if hasattr(e, "msg") and e.msg == "Repository was archived so is read-only.":
|
797 | 795 | attrs["archived"] = True
|
798 | 796 | else:
|
@@ -1124,7 +1122,7 @@ def _update_nodes_with_bot_rerun(gx: nx.DiGraph, package: str | None = None):
|
1124 | 1122 |
|
1125 | 1123 | nodes = gx.nodes.items() if not package else [(package, gx.nodes[package])]
|
1126 | 1124 |
|
1127 |
| - for i, (name, node) in nodes: |
| 1125 | + for i, (name, node) in enumerate(nodes): |
1128 | 1126 | # logger.info(
|
1129 | 1127 | # f"node: {i} memory usage: "
|
1130 | 1128 | # f"{psutil.Process().memory_info().rss // 1024 ** 2}MB",
|
@@ -1332,6 +1330,7 @@ def main(ctx: CliContext, package: str | None = None) -> None:
|
1332 | 1330 | smithy_version=smithy_version,
|
1333 | 1331 | pinning_version=pinning_version,
|
1334 | 1332 | )
|
| 1333 | + # TODO: this does not support --online |
1335 | 1334 | migrators = load_migrators()
|
1336 | 1335 |
|
1337 | 1336 | # compute the time per migrator
|
|
0 commit comments