continuous-refactoring 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,74 @@
1
+ from __future__ import annotations
2
+
3
+ from types import ModuleType
4
+
5
+ from continuous_refactoring import agent
6
+ from continuous_refactoring import artifacts
7
+ from continuous_refactoring import cli
8
+ from continuous_refactoring import decisions
9
+ from continuous_refactoring import failure_report
10
+ from continuous_refactoring import git
11
+ from continuous_refactoring import loop
12
+ from continuous_refactoring import migration_tick
13
+ from continuous_refactoring import migrations
14
+ from continuous_refactoring import phases
15
+ from continuous_refactoring import planning
16
+ from continuous_refactoring import prompts
17
+ from continuous_refactoring import routing
18
+ from continuous_refactoring import routing_pipeline
19
+ from continuous_refactoring import scope_candidates
20
+ from continuous_refactoring import scope_expansion
21
+
22
+ _PACKAGE_EXPORT_MODULES: tuple[ModuleType, ...] = (
23
+ agent,
24
+ artifacts,
25
+ cli,
26
+ decisions,
27
+ failure_report,
28
+ git,
29
+ loop,
30
+ migration_tick,
31
+ migrations,
32
+ phases,
33
+ planning,
34
+ prompts,
35
+ routing,
36
+ routing_pipeline,
37
+ scope_candidates,
38
+ scope_expansion,
39
+ )
40
+ _SUBMODULES: tuple[ModuleType, ...] = _PACKAGE_EXPORT_MODULES
41
+
42
+
43
+ def collect_package_exports(modules: tuple[ModuleType, ...]) -> tuple[str, ...]:
44
+ exports: list[str] = []
45
+ exporters: dict[str, str] = {}
46
+ resolved_exports: dict[str, object] = {}
47
+ for module in modules:
48
+ module_name = module.__name__
49
+ for name in module.__all__:
50
+ if name in exporters:
51
+ raise RuntimeError(
52
+ "Duplicate exported symbol in package __init__: "
53
+ f"{name!r} (original module: {exporters[name]}, "
54
+ f"conflicting module: {module_name})"
55
+ )
56
+ exporters[name] = module_name
57
+ resolved_exports[name] = getattr(module, name)
58
+ exports.append(name)
59
+ globals().update(resolved_exports)
60
+ return tuple(exports)
61
+
62
+
63
+ def _stabilize_package_export_order(exports: tuple[str, ...]) -> tuple[str, ...]:
64
+ names = list(exports)
65
+ describe_index = names.index("describe_scope_candidate")
66
+ names.pop(describe_index)
67
+ scope_selection_index = names.index("ScopeSelection")
68
+ names.insert(scope_selection_index + 1, "describe_scope_candidate")
69
+ return tuple(names)
70
+
71
+
72
+ __all__: tuple[str, ...] = _stabilize_package_export_order(
73
+ collect_package_exports(_SUBMODULES)
74
+ )
@@ -0,0 +1,8 @@
1
+ from __future__ import annotations
2
+
3
+ from continuous_refactoring import cli
4
+
5
+ __all__: tuple[str, ...] = ()
6
+
7
+ if __name__ == "__main__":
8
+ cli.cli_main()