codmap 0.0.44__tar.gz → 0.0.45__tar.gz
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.
- {codmap-0.0.44/codmap.egg-info → codmap-0.0.45}/PKG-INFO +1 -1
- {codmap-0.0.44 → codmap-0.0.45}/codemap/extract/behavior.py +8 -2
- {codmap-0.0.44 → codmap-0.0.45/codmap.egg-info}/PKG-INFO +1 -1
- {codmap-0.0.44 → codmap-0.0.45}/pyproject.toml +1 -1
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c120_dispatch_absorbed.py +7 -1
- {codmap-0.0.44 → codmap-0.0.45}/LICENSE +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/README.md +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/__init__.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/__main__.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/advise/__init__.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/advise/data/feed.json +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/advise/data/matrix.toml +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/advise/refresh.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/advise/render.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/apidiff.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/arch.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/cli.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/devkit/__init__.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/devkit/artifacts.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/devkit/hooks.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/devkit/install.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/devkit/ratchet.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/devkit/state.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/devkit/templates/agents_block.md +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/devkit/templates/agents_block.ru.md +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/devkit/templates/brief.txt +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/devkit/templates/claude_hooks.json +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/devkit/templates/codex_region.toml +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/devkit/templates/contract_head.toml +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/devkit/templates/cycles_region.toml +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/devkit/templates/github-workflow.yml +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/devkit/templates/gitlab-ci.yml +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/devkit/templates/mcp_claude.args +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/devkit/templates/post-commit.sh +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/devkit/templates/ratchet_region.toml +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/devkit/usage.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/diagnostics.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/extract/__init__.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/extract/attrflow.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/extract/dataflow.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/extract/dispatch.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/extract/griffe_extractor.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/extract/gsource.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/extract/probe.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/extract/roots.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/extract/union.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/freshness.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/incremental.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/integrations/__init__.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/integrations/base.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/integrations/cocoindex.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/integrations/gate.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/integrations/gitnexus.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/integrations/registry.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/integrations/transport.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/model.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/provenance.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/query.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/scope.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/serve/__init__.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/serve/_scip_pb2.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/serve/api_surface.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/serve/apidiff.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/serve/architecture.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/serve/audit.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/serve/check.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/serve/ctags.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/serve/currency.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/serve/impact.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/serve/limits.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/serve/livingdocs.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/serve/mcp_server.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/serve/mermaid.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/serve/pack.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/serve/rag.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/serve/review.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/serve/scip.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/serve/semantic.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/serve/server.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/serve/session.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/serve/subsystems.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/serve/vault.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/store.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/tomlio.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codemap/watch.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codmap.egg-info/SOURCES.txt +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codmap.egg-info/dependency_links.txt +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codmap.egg-info/entry_points.txt +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codmap.egg-info/requires.txt +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/codmap.egg-info/top_level.txt +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/setup.cfg +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_epistemic.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_gitnexus_router.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_impact_depth.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_integrations.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_issue3_serve_freshness.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_livingdocs.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_m0_api_surface.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_m11_argcontract.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_m12_dataflow.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_m15_review.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_m16_architecture.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_m17_mcp.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_m18_freshness.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_m1_5_semantics.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_m1_query.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_m2_views.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_m32_watch.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_m3_serve.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_m4_behavior.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_m5_deep.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_m6_repo_scope.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_m7_dispatch.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_m9_family.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_pack_honesty.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c108_devkit.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c109_namespace_source.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c110_advise.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c111_recipe.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c114_devkit_graph.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c115_agents_block.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c116_known_cycles.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c118_dead_code.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c119_first_build.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c13_callgraph_accuracy.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c13_grep_vs_graph.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c16_semantic.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c20_attribute_edges.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c21_flat_layout.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c22_source_visible_refs.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c23_hard_python.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c24_test_mapping.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c25_provenance.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c26_deep_union.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c27_config_honesty.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c28_limit_envelope.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c29_lazy_imports.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c2_ctags.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c30_local_import_calls.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c30f1_reexport_calls.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c30f2_check_scope.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c31_path_origin.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c32_report_json.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c33_query_signature.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c34_signature_kinds.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c35_contract_location.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c36_target_resolution.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c37_rule_mutation.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c38_tool_drift.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c39_edge_resolution.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c3_arch_contract.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c3_dogfood.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c40_flow_reach.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c41_scope_membership.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c42_deep_tier_stability.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c43_incremental_splice.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c44_absent_answers.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c45_repeat_union.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c46_shadowed_definitions.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c47_incremental_resample.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c48_type_checking_imports.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c49_type_only_cycles.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c4_complexity.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c50_flow_entry_points.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c53_narrowing_declared.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c54_deterministic_rendering.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c55_override_grade.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c56_stub_files.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c57_facade_package.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c58_cycle_tangles.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c59_completeness_drop.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c5_apidiff.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c60_nested_definitions.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c62_phantom_rules.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c63_answer_format.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c64_dependency_probe.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c66_pack_direction.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c68_dotted_imports.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c69_contract_validation.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c6_pack.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c70_check_graph_currency.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c71_attribute_chain_calls.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c72_flat_inference_in_packages.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c73_cli_version.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c74_call_site_conservation.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c75_reexported_class_calls.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c76_contract_table_typo.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c77_gate_probe_battery.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c78_forbidden_chains.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c7_edge_vocab.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c80_tests_through_helpers.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c81_protocol_dispatch.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c82_review_changed_lines.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c83_foreign_graph_paths.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c84_missing_roots.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c85_mcp_graph_currency.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c86_incremental_repo_scope.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c87_review_path_base.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c89_review_docs.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c8_deadcode.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c90_currency_without_recipe.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c91_route_vocabulary.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c92_sidecar_pair.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c94_root_builds.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c95_r1c96_foreign_trees.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_r1c9_incremental.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_scip_export.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_scope.py +0 -0
- {codmap-0.0.44 → codmap-0.0.45}/tests/test_subsystems.py +0 -0
|
@@ -121,13 +121,15 @@ def add_behavior(graph, griffe_root, target_pkg: str, *, deep: bool = False,
|
|
|
121
121
|
decorators_of=fnode, reexports=reexports)
|
|
122
122
|
if members:
|
|
123
123
|
_emit_self_references(graph, node_id, fnode, members)
|
|
124
|
-
_emit_dispatch_references(graph, node_id, list(_own_nodes(fnode)))
|
|
125
124
|
# R1-C22 D2: module-level statements are a scope of their own, never walked
|
|
126
125
|
# above — import-time calls and dispatch tables live here.
|
|
127
126
|
def mod_fast(call, _im=imports, _mm=modmembers):
|
|
128
127
|
return _resolve(call, modpath, "", _im, _mm, {}, reexports, nodes)
|
|
129
128
|
mod_resolve = (_deep_then_fast(graph, script, target_pkg, mod_fast, modpath, known_modules)
|
|
130
129
|
if script else mod_fast)
|
|
130
|
+
# R1-C120/f1: the module is the scope — a factory returning `import_module(...)` and the functions that
|
|
131
|
+
# `getattr` the module it returns are usually different functions of one runner module.
|
|
132
|
+
_emit_dispatch_references(graph, modpath, list(ast.walk(tree)))
|
|
131
133
|
_process_module_level(graph, modpath, tree, mod_resolve, imports, modmembers,
|
|
132
134
|
reexports, shadow_skip=shadow_skip)
|
|
133
135
|
# R1-C74: class bodies run at import time and were walked by nobody.
|
|
@@ -1031,9 +1033,13 @@ def _import_prefix(call) -> str | None:
|
|
|
1031
1033
|
|
|
1032
1034
|
|
|
1033
1035
|
def _emit_dispatch_references(graph, src_id, nodes) -> None:
|
|
1034
|
-
"""`references` edges for dispatch by name (R1-C120): a
|
|
1036
|
+
"""`references` edges for dispatch by name (R1-C120): a module that imports ``pkg.sub.<name>`` from a
|
|
1035
1037
|
string with a literal prefix and reads ``getattr(<x>, "run")`` reaches every ``pkg.sub.<mod>.run``.
|
|
1036
1038
|
|
|
1039
|
+
The scope is the whole module, sourced from the module node (R1-C120/f1): in the consumer's runner the
|
|
1040
|
+
factory (`module_for` → `import_module(...)`) and the readers (`getattr(module, "run")`, `"empty"`) are three
|
|
1041
|
+
different functions, and pairing within one function claimed nothing there.
|
|
1042
|
+
|
|
1037
1043
|
The commonest plugin shape — a runner that loads a module by name and calls its ``run`` — made no edge, so
|
|
1038
1044
|
each plugin's ``run`` read as uncalled public code, graded high. Claimed only with both halves in one scope:
|
|
1039
1045
|
a literal package prefix (ending in a dot) and a literal attribute name. Every module directly under the
|
|
@@ -9,7 +9,7 @@ build-backend = "setuptools.build_meta"
|
|
|
9
9
|
# version. README says this plainly, since `pip install codmap` / `import codemap` is a
|
|
10
10
|
# seam a reader will otherwise hit by surprise.
|
|
11
11
|
name = "codmap"
|
|
12
|
-
version = "0.0.
|
|
12
|
+
version = "0.0.45"
|
|
13
13
|
description = "Static analyzer that turns a package's source into a queryable code graph."
|
|
14
14
|
readme = "README.md"
|
|
15
15
|
# M20/D1: measured, not assumed. Each release of the declared range runs the full suite in
|
|
@@ -24,6 +24,12 @@ RUNNER = {
|
|
|
24
24
|
"noprefix": 'import importlib\n\n\ndef load(name):\n m = importlib.import_module(name)\n'
|
|
25
25
|
' return getattr(m, "run")()\n',
|
|
26
26
|
"nogetattr": 'import importlib\n\n\ndef load(short):\n return importlib.import_module(f"pkg.tools.{short}")\n',
|
|
27
|
+
# R1-C120/f1: the consumer's shape — a factory, and the getattr calls in other functions of the module
|
|
28
|
+
"factory": 'import importlib\nfrom types import ModuleType\n\n\ndef module_for(short) -> ModuleType:\n'
|
|
29
|
+
' return importlib.import_module(f"pkg.tools.{short}")\n\n\n'
|
|
30
|
+
'def emptiness(module: ModuleType):\n return getattr(module, "empty", None)\n\n\n'
|
|
31
|
+
'class Session:\n def go(self, short):\n module = module_for(short)\n'
|
|
32
|
+
' probe = getattr(module, "run", None)\n return probe()\n',
|
|
27
33
|
}
|
|
28
34
|
|
|
29
35
|
|
|
@@ -39,7 +45,7 @@ def _q(tmp_path: Path, runner: str) -> Query:
|
|
|
39
45
|
|
|
40
46
|
|
|
41
47
|
def test_a1_a_runner_reaches_every_run_under_its_prefix(tmp_path):
|
|
42
|
-
for i, shape in enumerate(("f", "plus")):
|
|
48
|
+
for i, shape in enumerate(("f", "plus", "factory")):
|
|
43
49
|
q = _q(tmp_path / str(i), RUNNER[shape])
|
|
44
50
|
out = build_dead_code(q, public=True)
|
|
45
51
|
public = {c["id"] for c in out["uncalled_public"]["candidates"]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|