code2llm 0.5.161__tar.gz → 0.5.163__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.
Files changed (208) hide show
  1. {code2llm-0.5.161/code2llm.egg-info → code2llm-0.5.163}/PKG-INFO +5 -6
  2. {code2llm-0.5.161 → code2llm-0.5.163}/README.md +4 -5
  3. code2llm-0.5.163/VERSION +1 -0
  4. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/__init__.py +1 -1
  5. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/analysis/pipeline_detector.py +1 -1
  6. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/analysis/smells.py +32 -7
  7. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/cli_exports/formats.py +2 -1
  8. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/cli_exports/prompt.py +74 -35
  9. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/cli_parser.py +1 -1
  10. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/core/lang/base.py +0 -2
  11. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/core/lang/ts_parser.py +1 -1
  12. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/core/lang/typescript.py +4 -4
  13. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/core/streaming_analyzer.py +4 -6
  14. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/core/toon_size_manager.py +3 -1
  15. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/dashboard_data.py +1 -1
  16. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/dashboard_renderer.py +10 -10
  17. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/index_generator/renderer.py +9 -9
  18. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/map/header.py +2 -2
  19. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/map/yaml_export.py +4 -1
  20. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/project_yaml/hotspots.py +1 -1
  21. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/readme/content.py +4 -4
  22. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/readme/sections.py +6 -6
  23. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/toon/helpers.py +1 -1
  24. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/toon/metrics_health.py +1 -1
  25. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/yaml_exporter.py +10 -10
  26. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/generators/llm_flow.py +0 -2
  27. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/generators/mermaid/png.py +1 -1
  28. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/nlp/__init__.py +1 -1
  29. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/parsers/toon_parser.py +1 -1
  30. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/refactor/prompt_engine.py +6 -7
  31. {code2llm-0.5.161 → code2llm-0.5.163/code2llm.egg-info}/PKG-INFO +5 -6
  32. {code2llm-0.5.161 → code2llm-0.5.163}/pyproject.toml +1 -1
  33. code2llm-0.5.161/VERSION +0 -1
  34. {code2llm-0.5.161 → code2llm-0.5.163}/LICENSE +0 -0
  35. {code2llm-0.5.161 → code2llm-0.5.163}/MANIFEST.in +0 -0
  36. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/__main__.py +0 -0
  37. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/analysis/__init__.py +0 -0
  38. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/analysis/_data_impl.py +0 -0
  39. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/analysis/call_graph.py +0 -0
  40. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/analysis/cfg.py +0 -0
  41. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/analysis/coupling.py +0 -0
  42. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/analysis/data_analysis.py +0 -0
  43. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/analysis/dfg.py +0 -0
  44. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/analysis/pipeline_classifier.py +0 -0
  45. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/analysis/pipeline_resolver.py +0 -0
  46. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/analysis/side_effects.py +0 -0
  47. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/analysis/type_inference.py +0 -0
  48. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/analysis/utils/__init__.py +0 -0
  49. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/analysis/utils/ast_helpers.py +0 -0
  50. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/api.py +0 -0
  51. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/cli.py +0 -0
  52. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/cli_analysis.py +0 -0
  53. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/cli_commands.py +0 -0
  54. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/cli_exports/__init__.py +0 -0
  55. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/cli_exports/code2logic.py +0 -0
  56. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/cli_exports/orchestrator.py +0 -0
  57. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/cli_exports/orchestrator_chunked.py +0 -0
  58. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/cli_exports/orchestrator_constants.py +0 -0
  59. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/cli_exports/orchestrator_handlers.py +0 -0
  60. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/core/__init__.py +0 -0
  61. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/core/analyzer.py +0 -0
  62. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/core/ast_registry.py +0 -0
  63. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/core/config.py +0 -0
  64. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/core/export_pipeline.py +0 -0
  65. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/core/file_analyzer.py +0 -0
  66. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/core/file_cache.py +0 -0
  67. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/core/file_filter.py +0 -0
  68. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/core/gitignore.py +0 -0
  69. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/core/incremental.py +0 -0
  70. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/core/lang/__init__.py +0 -0
  71. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/core/lang/_c_parser.py +0 -0
  72. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/core/lang/_calls.py +0 -0
  73. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/core/lang/_complexity.py +0 -0
  74. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/core/lang/cpp.py +0 -0
  75. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/core/lang/csharp.py +0 -0
  76. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/core/lang/generic.py +0 -0
  77. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/core/lang/go_lang.py +0 -0
  78. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/core/lang/java.py +0 -0
  79. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/core/lang/php.py +0 -0
  80. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/core/lang/ruby.py +0 -0
  81. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/core/lang/rust.py +0 -0
  82. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/core/lang/ts_extractors.py +0 -0
  83. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/core/large_repo.py +0 -0
  84. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/core/models.py +0 -0
  85. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/core/persistent_cache.py +0 -0
  86. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/core/refactoring.py +0 -0
  87. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/core/repo_files.py +0 -0
  88. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/core/source_classifier.py +0 -0
  89. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/core/streaming/__init__.py +0 -0
  90. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/core/streaming/cache.py +0 -0
  91. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/core/streaming/incremental.py +0 -0
  92. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/core/streaming/prioritizer.py +0 -0
  93. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/core/streaming/scanner.py +0 -0
  94. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/core/streaming/strategies.py +0 -0
  95. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/__init__.py +0 -0
  96. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/article_view.py +0 -0
  97. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/base.py +0 -0
  98. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/context_exporter.py +0 -0
  99. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/context_view.py +0 -0
  100. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/evolution/__init__.py +0 -0
  101. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/evolution/computation.py +0 -0
  102. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/evolution/constants.py +0 -0
  103. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/evolution/exclusion.py +0 -0
  104. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/evolution/render.py +0 -0
  105. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/evolution/yaml_export.py +0 -0
  106. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/evolution_exporter.py +0 -0
  107. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/flow_constants.py +0 -0
  108. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/flow_exporter.py +0 -0
  109. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/flow_renderer.py +0 -0
  110. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/html_dashboard.py +0 -0
  111. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/index_generator/__init__.py +0 -0
  112. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/index_generator/scanner.py +0 -0
  113. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/index_generator.py +0 -0
  114. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/json_exporter.py +0 -0
  115. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/llm_exporter.py +0 -0
  116. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/map/__init__.py +0 -0
  117. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/map/alerts.py +0 -0
  118. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/map/details.py +0 -0
  119. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/map/module_list.py +0 -0
  120. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/map/utils.py +0 -0
  121. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/map_exporter.py +0 -0
  122. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/mermaid/__init__.py +0 -0
  123. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/mermaid/calls.py +0 -0
  124. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/mermaid/classic.py +0 -0
  125. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/mermaid/compact.py +0 -0
  126. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/mermaid/flow_compact.py +0 -0
  127. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/mermaid/flow_detailed.py +0 -0
  128. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/mermaid/flow_full.py +0 -0
  129. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/mermaid/utils.py +0 -0
  130. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/mermaid_exporter.py +0 -0
  131. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/mermaid_flow_helpers.py +0 -0
  132. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/planfile_tickets.py +0 -0
  133. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/project_yaml/__init__.py +0 -0
  134. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/project_yaml/constants.py +0 -0
  135. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/project_yaml/core.py +0 -0
  136. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/project_yaml/evolution.py +0 -0
  137. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/project_yaml/health.py +0 -0
  138. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/project_yaml/modules.py +0 -0
  139. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/project_yaml_exporter.py +0 -0
  140. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/readme/__init__.py +0 -0
  141. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/readme/files.py +0 -0
  142. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/readme/insights.py +0 -0
  143. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/readme_exporter.py +0 -0
  144. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/report_generators.py +0 -0
  145. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/toon/__init__.py +0 -0
  146. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/toon/_render_coupling_helpers.py +0 -0
  147. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/toon/_render_section_helpers.py +0 -0
  148. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/toon/constants.py +0 -0
  149. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/toon/metrics.py +0 -0
  150. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/toon/metrics_core.py +0 -0
  151. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/toon/metrics_duplicates.py +0 -0
  152. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/toon/module_detail.py +0 -0
  153. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/toon/renderer.py +0 -0
  154. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/toon.py +0 -0
  155. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/toon_view.py +0 -0
  156. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/exporters/validate_project.py +0 -0
  157. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/generators/__init__.py +0 -0
  158. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/generators/_utils.py +0 -0
  159. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/generators/llm_flow/__init__.py +0 -0
  160. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/generators/llm_flow/analysis.py +0 -0
  161. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/generators/llm_flow/cli.py +0 -0
  162. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/generators/llm_flow/generator.py +0 -0
  163. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/generators/llm_flow/nodes.py +0 -0
  164. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/generators/llm_flow/parsing.py +0 -0
  165. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/generators/llm_flow/utils.py +0 -0
  166. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/generators/llm_task.py +0 -0
  167. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/generators/mermaid/__init__.py +0 -0
  168. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/generators/mermaid/fix.py +0 -0
  169. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/generators/mermaid/validation.py +0 -0
  170. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/generators/mermaid.py +0 -0
  171. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/nlp/config.py +0 -0
  172. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/nlp/entity_resolution.py +0 -0
  173. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/nlp/intent_matching.py +0 -0
  174. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/nlp/normalization.py +0 -0
  175. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/nlp/pipeline.py +0 -0
  176. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/patterns/__init__.py +0 -0
  177. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/patterns/detector.py +0 -0
  178. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm/refactor/__init__.py +0 -0
  179. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm.egg-info/SOURCES.txt +0 -0
  180. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm.egg-info/dependency_links.txt +0 -0
  181. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm.egg-info/entry_points.txt +0 -0
  182. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm.egg-info/requires.txt +0 -0
  183. {code2llm-0.5.161 → code2llm-0.5.163}/code2llm.egg-info/top_level.txt +0 -0
  184. {code2llm-0.5.161 → code2llm-0.5.163}/setup.cfg +0 -0
  185. {code2llm-0.5.161 → code2llm-0.5.163}/setup.py +0 -0
  186. {code2llm-0.5.161 → code2llm-0.5.163}/tests/test_advanced_analysis.py +0 -0
  187. {code2llm-0.5.161 → code2llm-0.5.163}/tests/test_analyzer.py +0 -0
  188. {code2llm-0.5.161 → code2llm-0.5.163}/tests/test_cache_invalidation_e2e.py +0 -0
  189. {code2llm-0.5.161 → code2llm-0.5.163}/tests/test_calls_toon_export.py +0 -0
  190. {code2llm-0.5.161 → code2llm-0.5.163}/tests/test_declarative_collection.py +0 -0
  191. {code2llm-0.5.161 → code2llm-0.5.163}/tests/test_deep_analysis.py +0 -0
  192. {code2llm-0.5.161 → code2llm-0.5.163}/tests/test_edge_cases.py +0 -0
  193. {code2llm-0.5.161 → code2llm-0.5.163}/tests/test_export_cache_flags.py +0 -0
  194. {code2llm-0.5.161 → code2llm-0.5.163}/tests/test_file_analyzer_tagging.py +0 -0
  195. {code2llm-0.5.161 → code2llm-0.5.163}/tests/test_flow_exporter.py +0 -0
  196. {code2llm-0.5.161 → code2llm-0.5.163}/tests/test_format_quality.py +0 -0
  197. {code2llm-0.5.161 → code2llm-0.5.163}/tests/test_multilanguage_e2e.py +0 -0
  198. {code2llm-0.5.161 → code2llm-0.5.163}/tests/test_nlp_pipeline.py +0 -0
  199. {code2llm-0.5.161 → code2llm-0.5.163}/tests/test_nonpython_cc_calls.py +0 -0
  200. {code2llm-0.5.161 → code2llm-0.5.163}/tests/test_orchestrator_cache_mtime.py +0 -0
  201. {code2llm-0.5.161 → code2llm-0.5.163}/tests/test_persistent_cache.py +0 -0
  202. {code2llm-0.5.161 → code2llm-0.5.163}/tests/test_pipeline_detector.py +0 -0
  203. {code2llm-0.5.161 → code2llm-0.5.163}/tests/test_planfile_tickets_exporter.py +0 -0
  204. {code2llm-0.5.161 → code2llm-0.5.163}/tests/test_project_toon_export.py +0 -0
  205. {code2llm-0.5.161 → code2llm-0.5.163}/tests/test_prompt_engine.py +0 -0
  206. {code2llm-0.5.161 → code2llm-0.5.163}/tests/test_prompt_txt.py +0 -0
  207. {code2llm-0.5.161 → code2llm-0.5.163}/tests/test_refactoring_engine.py +0 -0
  208. {code2llm-0.5.161 → code2llm-0.5.163}/tests/test_toon_v2.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: code2llm
3
- Version: 0.5.161
3
+ Version: 0.5.163
4
4
  Summary: High-performance Python code flow analysis with optimized TOON format - CFG, DFG, call graphs, and intelligent code queries
5
5
  Home-page: https://github.com/wronai/stts
6
6
  Author: STTS Project
@@ -66,17 +66,16 @@ Dynamic: requires-python
66
66
 
67
67
  ## AI Cost Tracking
68
68
 
69
- ![PyPI](https://img.shields.io/badge/pypi-costs-blue) ![Version](https://img.shields.io/badge/version-0.5.161-blue) ![Python](https://img.shields.io/badge/python-3.9+-blue) ![License](https://img.shields.io/badge/license-Apache--2.0-green)
70
- ![AI Cost](https://img.shields.io/badge/AI%20Cost-$7.50-orange) ![Human Time](https://img.shields.io/badge/Human%20Time-84.7h-blue) ![Model](https://img.shields.io/badge/Model-openrouter%2Fqwen%2Fqwen3--coder--next-lightgrey)
69
+ ![PyPI](https://img.shields.io/badge/pypi-costs-blue) ![Version](https://img.shields.io/badge/version-0.5.163-blue) ![Python](https://img.shields.io/badge/python-3.9+-blue) ![License](https://img.shields.io/badge/license-Apache--2.0-green)
70
+ ![AI Cost](https://img.shields.io/badge/AI%20Cost-$7.50-orange) ![Human Time](https://img.shields.io/badge/Human%20Time-85.1h-blue) ![Model](https://img.shields.io/badge/Model-openrouter%2Fqwen%2Fqwen3--coder--next-lightgrey)
71
71
 
72
- - 🤖 **LLM usage:** $7.5000 (230 commits)
73
- - 👤 **Human dev:** ~$8470 (84.7h @ $100/h, 30min dedup)
72
+ - 🤖 **LLM usage:** $7.5000 (235 commits)
73
+ - 👤 **Human dev:** ~$8511 (85.1h @ $100/h, 30min dedup)
74
74
 
75
75
  Generated on 2026-05-25 using [openrouter/qwen/qwen3-coder-next](https://openrouter.ai/qwen/qwen3-coder-next)
76
76
 
77
77
  ---
78
78
 
79
-
80
79
  <!-- generated in 0.00s -->
81
80
 
82
81
  This directory contains the complete analysis of your project generated by `code2llm`. Each file serves a specific purpose for understanding, refactoring, and documenting your codebase.
@@ -2,17 +2,16 @@
2
2
 
3
3
  ## AI Cost Tracking
4
4
 
5
- ![PyPI](https://img.shields.io/badge/pypi-costs-blue) ![Version](https://img.shields.io/badge/version-0.5.161-blue) ![Python](https://img.shields.io/badge/python-3.9+-blue) ![License](https://img.shields.io/badge/license-Apache--2.0-green)
6
- ![AI Cost](https://img.shields.io/badge/AI%20Cost-$7.50-orange) ![Human Time](https://img.shields.io/badge/Human%20Time-84.7h-blue) ![Model](https://img.shields.io/badge/Model-openrouter%2Fqwen%2Fqwen3--coder--next-lightgrey)
5
+ ![PyPI](https://img.shields.io/badge/pypi-costs-blue) ![Version](https://img.shields.io/badge/version-0.5.163-blue) ![Python](https://img.shields.io/badge/python-3.9+-blue) ![License](https://img.shields.io/badge/license-Apache--2.0-green)
6
+ ![AI Cost](https://img.shields.io/badge/AI%20Cost-$7.50-orange) ![Human Time](https://img.shields.io/badge/Human%20Time-85.1h-blue) ![Model](https://img.shields.io/badge/Model-openrouter%2Fqwen%2Fqwen3--coder--next-lightgrey)
7
7
 
8
- - 🤖 **LLM usage:** $7.5000 (230 commits)
9
- - 👤 **Human dev:** ~$8470 (84.7h @ $100/h, 30min dedup)
8
+ - 🤖 **LLM usage:** $7.5000 (235 commits)
9
+ - 👤 **Human dev:** ~$8511 (85.1h @ $100/h, 30min dedup)
10
10
 
11
11
  Generated on 2026-05-25 using [openrouter/qwen/qwen3-coder-next](https://openrouter.ai/qwen/qwen3-coder-next)
12
12
 
13
13
  ---
14
14
 
15
-
16
15
  <!-- generated in 0.00s -->
17
16
 
18
17
  This directory contains the complete analysis of your project generated by `code2llm`. Each file serves a specific purpose for understanding, refactoring, and documenting your codebase.
@@ -0,0 +1 @@
1
+ 0.5.163
@@ -8,7 +8,7 @@ Includes NLP Processing Pipeline for query normalization, intent matching,
8
8
  and entity resolution with multilingual support.
9
9
  """
10
10
 
11
- __version__ = "0.5.161"
11
+ __version__ = "0.5.163"
12
12
  __author__ = "STTS Project"
13
13
 
14
14
  # Core analysis components (lightweight, always needed)
@@ -13,7 +13,7 @@ Refactored v0.5.x: Extracted resolver and classifier into separate modules.
13
13
 
14
14
  import logging
15
15
  from dataclasses import dataclass, field
16
- from typing import Any, Dict, List, Optional, Set
16
+ from typing import Any, Dict, List, Optional, Set, Tuple
17
17
 
18
18
  import networkx as nx
19
19
 
@@ -56,7 +56,11 @@ class SmellDetector:
56
56
  file=func_info.file,
57
57
  line=func_info.line,
58
58
  severity=severity,
59
- description=f"Function '{func_info.name}' is oversized: CC={complexity}, fan-out={fan_out}, mutations={mutation_count}.",
59
+ description=(
60
+ f"Function '{func_info.name}' is oversized:"
61
+ f" CC={complexity}, fan-out={fan_out},"
62
+ f" mutations={mutation_count}."
63
+ ),
60
64
  context={
61
65
  "fan_out": fan_out,
62
66
  "mutations": mutation_count,
@@ -85,7 +89,11 @@ class SmellDetector:
85
89
  file=mod.file,
86
90
  line=1,
87
91
  severity=severity,
88
- description=f"Module '{mod_name}' is too large ({f_count} functions, {c_count} classes). Consider splitting into sub-modules.",
92
+ description=(
93
+ f"Module '{mod_name}' is too large"
94
+ f" ({f_count} functions, {c_count} classes)."
95
+ " Consider splitting into sub-modules."
96
+ ),
89
97
  context={"functions": f_count, "classes": c_count},
90
98
  )
91
99
  )
@@ -113,7 +121,10 @@ class SmellDetector:
113
121
  file=func_info.file,
114
122
  line=func_info.line,
115
123
  severity=0.7,
116
- description=f"Function '{func_info.name}' mutates multiple variables in other modules: {', '.join(set(foreign_mutations))}.",
124
+ description=(
125
+ f"Function '{func_info.name}' mutates multiple variables"
126
+ f" in other modules: {', '.join(set(foreign_mutations))}."
127
+ ),
117
128
  context={"foreign_mutations": list(set(foreign_mutations))},
118
129
  )
119
130
  )
@@ -142,7 +153,10 @@ class SmellDetector:
142
153
  file=func_info.file,
143
154
  line=func_info.line,
144
155
  severity=0.6,
145
- description=f"Arguments ({', '.join(args)}) are used together in multiple functions: {', '.join(funcs)}.",
156
+ description=(
157
+ f"Arguments ({', '.join(args)}) are used together"
158
+ f" in multiple functions: {', '.join(funcs)}."
159
+ ),
146
160
  context={"clump": list(args), "related_functions": funcs},
147
161
  )
148
162
  )
@@ -173,7 +187,10 @@ class SmellDetector:
173
187
  file=func_info.file,
174
188
  line=func_info.line,
175
189
  severity=0.8,
176
- description=f"Mutation of variable '{var}' spans {len(funcs)} functions. Changing this logic requires work in many places.",
190
+ description=(
191
+ f"Mutation of variable '{var}' spans {len(funcs)} functions."
192
+ " Changing this logic requires work in many places."
193
+ ),
177
194
  context={"variable": var, "affected_functions": list(funcs)},
178
195
  )
179
196
  )
@@ -192,7 +209,11 @@ class SmellDetector:
192
209
  file=func_info.file,
193
210
  line=func_info.line,
194
211
  severity=min(1.0, func_info.centrality * 5),
195
- description=f"Function '{func_info.name}' is a structural bottleneck (centrality={round(func_info.centrality, 3)}). Significant logic flows through this function.",
212
+ description=(
213
+ f"Function '{func_info.name}' is a structural bottleneck"
214
+ f" (centrality={round(func_info.centrality, 3)})."
215
+ " Significant logic flows through this function."
216
+ ),
196
217
  context={"centrality": func_info.centrality},
197
218
  )
198
219
  )
@@ -218,7 +239,11 @@ class SmellDetector:
218
239
  file=func_info.file,
219
240
  line=func_info.line,
220
241
  severity=0.8,
221
- description=f"Circular dependency detected: {' -> '.join(cycle)}. This indicates high coupling and may lead to infinite recursion or initialization issues.",
242
+ description=(
243
+ f"Circular dependency detected: {' -> '.join(cycle)}."
244
+ " This indicates high coupling and may lead to"
245
+ " infinite recursion or initialization issues."
246
+ ),
222
247
  context={"cycle": cycle},
223
248
  )
224
249
  )
@@ -1,4 +1,5 @@
1
- """Format export functions — toon, map, context, yaml, json, mermaid, evolution, and legacy project-yaml/flow exports."""
1
+ """Format export functions — toon, map, context, yaml, json, mermaid, evolution,
2
+ and legacy project-yaml/flow exports."""
2
3
 
3
4
  # Each _export_* function handles one output format; _export_mermaid_pngs handles optional PNG generation.
4
5
  # Format routing is centralised in cli_exports/orchestrator.py and cli_exports/orchestrator_handlers.py.
@@ -16,11 +16,33 @@
16
16
  # ── Utilities ─────────────────────────────────────────────────────────────────
17
17
  # _format_size() : human-readable byte count (B/KB/MB).
18
18
  # _get_missing_files() : list expected output files not yet generated.
19
+ #
20
+ # ── Output layout ─────────────────────────────────────────────────────────────
21
+ # prompt.txt structure (single-file mode):
22
+ # [HEADER] project path, date, token estimate.
23
+ # [MAIN FILES] analysis.toon.yaml, context.md (full embed).
24
+ # [OPTIONAL FILES] calls.yaml, flow.toon.yaml, map.toon.yaml (if present).
25
+ # [SUBPROJECTS] per-subproject mini-prompt blocks (if multi-project).
26
+ # [MISSING FILES] list of expected-but-absent output files.
27
+ #
28
+ # prompt_NNN.txt structure (chunked mode):
29
+ # Each chunk = header + slice of main/optional content ≤ chunk_size bytes.
19
30
 
20
31
  import time
21
32
  from pathlib import Path
22
33
  from typing import List, Optional, Tuple
23
34
 
35
+ # ── Output filename constants ──────────────────────────────────────────────────
36
+ _F_ANALYSIS_TOON = "analysis.toon"
37
+ _F_MAP_TOON = "map.toon.yaml"
38
+ _F_EVOLUTION_TOON = "evolution.toon.yaml"
39
+ _F_PROJECT_TOON_YAML = "project.toon.yaml"
40
+ _F_CONTEXT_MD = "context.md"
41
+ _F_README_MD = "README.md"
42
+ _F_PROJECT_TOON = "project.toon"
43
+ _F_VALIDATION_TOON = "project/validation.toon.yaml"
44
+ _F_DUPLICATION_TOON = "project/duplication.toon.yaml"
45
+
24
46
 
25
47
  def _export_prompt_txt(
26
48
  args, output_dir: Path, formats: list[str], source_path: Optional[Path] = None
@@ -117,49 +139,49 @@ def _get_prompt_paths(source_path: Optional[Path], output_dir: Path) -> Tuple[st
117
139
 
118
140
  _MAIN_FILES = [
119
141
  (
120
- "analysis.toon",
142
+ _F_ANALYSIS_TOON,
121
143
  "Health diagnostics - complexity metrics, god modules, coupling issues, refactoring priorities",
122
- ("analysis.toon", "analysis.toon.yaml"),
144
+ (_F_ANALYSIS_TOON, "analysis.toon.yaml"),
123
145
  ),
124
146
  (
125
- "map.toon.yaml",
147
+ _F_MAP_TOON,
126
148
  "Structural map - files, sizes, imports, exports, signatures, project header",
127
- ("map.toon.yaml",),
149
+ (_F_MAP_TOON,),
128
150
  ),
129
151
  (
130
- "evolution.toon.yaml",
152
+ _F_EVOLUTION_TOON,
131
153
  "Refactoring queue - ranked actions by impact/effort, risks, metrics targets, history",
132
- ("evolution.toon.yaml",),
154
+ (_F_EVOLUTION_TOON,),
133
155
  ),
134
156
  (
135
- "project.toon.yaml",
157
+ _F_PROJECT_TOON_YAML,
136
158
  "Compact project overview - generated from project.yaml data",
137
- ("project.toon.yaml",),
159
+ (_F_PROJECT_TOON_YAML,),
138
160
  ),
139
161
  (
140
- "context.md",
162
+ _F_CONTEXT_MD,
141
163
  "LLM narrative - architecture summary and project context",
142
- ("context.md",),
164
+ (_F_CONTEXT_MD,),
143
165
  ),
144
- ("README.md", "Generated documentation - overview and usage guide", ("README.md",)),
166
+ (_F_README_MD, "Generated documentation - overview and usage guide", (_F_README_MD,)),
145
167
  ]
146
168
 
147
169
 
148
170
  _OPTIONAL_FILES = [
149
171
  (
150
- "project.toon",
172
+ _F_PROJECT_TOON,
151
173
  "Project logic - compact module view from code2logic",
152
- ("project.toon", "project/project.toon", "project.toon.txt"),
174
+ (_F_PROJECT_TOON, "project/project.toon", "project.toon.txt"),
153
175
  ),
154
176
  (
155
- "project/validation.toon.yaml",
177
+ _F_VALIDATION_TOON,
156
178
  "Validation analysis - generated by vallm tool",
157
- ("project/validation.toon.yaml",),
179
+ (_F_VALIDATION_TOON,),
158
180
  ),
159
181
  (
160
- "project/duplication.toon.yaml",
182
+ _F_DUPLICATION_TOON,
161
183
  "Code duplication analysis - generated by redup tool",
162
- ("project/duplication.toon.yaml",),
184
+ (_F_DUPLICATION_TOON,),
163
185
  ),
164
186
  ]
165
187
 
@@ -175,7 +197,8 @@ def _build_prompt_header(project_path: str) -> List[str]:
175
197
  "",
176
198
  "Files for analysis:",
177
199
  "",
178
- "Note: project/validation.toon.yaml and project/duplication.toon.yaml are generated by external tools (vallm and redup)",
200
+ "Note: project/validation.toon.yaml and project/duplication.toon.yaml"
201
+ " are generated by external tools (vallm and redup)",
179
202
  ]
180
203
 
181
204
 
@@ -261,7 +284,7 @@ def _build_subprojects_section(
261
284
  )
262
285
  sp_files = []
263
286
  total_size = 0
264
- for f in ["analysis.toon", "context.md", "evolution.toon.yaml"]:
287
+ for f in [_F_ANALYSIS_TOON, _F_CONTEXT_MD, _F_EVOLUTION_TOON]:
265
288
  f_path = sp_dir / f
266
289
  if f_path.exists():
267
290
  size = f_path.stat().st_size
@@ -272,7 +295,8 @@ def _build_subprojects_section(
272
295
  size_str = _format_size(total_size)
273
296
  file_list = ", ".join(sp_files)
274
297
  lines.append(
275
- f"- {output_rel_path}/{sp.name.replace('.', '_')}/ [{level_name}] Total: {size_str} - Contains: {file_list}"
298
+ f"- {output_rel_path}/{sp.name.replace('.', '_')}/"
299
+ f" [{level_name}] Total: {size_str} - Contains: {file_list}"
276
300
  )
277
301
 
278
302
  return lines
@@ -301,15 +325,24 @@ def _build_missing_files_section(output_dir: Path, output_rel_path: str) -> List
301
325
 
302
326
  # (has_key, file_key, candidate_filenames, default_path)
303
327
  _OUTPUT_FILE_SPECS = [
304
- ("has_analysis_toon", "analysis_file", ("analysis.toon", "analysis.toon.yaml"), "analysis.toon"),
305
- ("has_map_toon", "map_file", ("map.toon.yaml",), "map.toon.yaml"),
306
- ("has_evolution_toon", "evolution_file", ("evolution.toon.yaml",), "evolution.toon.yaml"),
307
- ("has_project_toon_yaml","project_toon_file", ("project.toon.yaml",), "project.toon.yaml"),
308
- ("has_context_md", "context_file", ("context.md",), "context.md"),
309
- ("has_readme_md", "readme_file", ("README.md",), "README.md"),
310
- ("has_project_logic", "project_logic_file", ("project.toon", "project/project.toon", "project.toon.txt"), "project.toon"),
311
- ("has_validation_toon", "validation_file", ("project/validation.toon.yaml",), "project/validation.toon.yaml"),
312
- ("has_duplication_toon", "duplication_file", ("project/duplication.toon.yaml",), "project/duplication.toon.yaml"),
328
+ ("has_analysis_toon", "analysis_file",
329
+ (_F_ANALYSIS_TOON, "analysis.toon.yaml"), _F_ANALYSIS_TOON),
330
+ ("has_map_toon", "map_file",
331
+ (_F_MAP_TOON,), _F_MAP_TOON),
332
+ ("has_evolution_toon", "evolution_file",
333
+ (_F_EVOLUTION_TOON,), _F_EVOLUTION_TOON),
334
+ ("has_project_toon_yaml", "project_toon_file",
335
+ (_F_PROJECT_TOON_YAML,), _F_PROJECT_TOON_YAML),
336
+ ("has_context_md", "context_file",
337
+ (_F_CONTEXT_MD,), _F_CONTEXT_MD),
338
+ ("has_readme_md", "readme_file",
339
+ (_F_README_MD,), _F_README_MD),
340
+ ("has_project_logic", "project_logic_file",
341
+ (_F_PROJECT_TOON, "project/project.toon", "project.toon.txt"), _F_PROJECT_TOON),
342
+ ("has_validation_toon", "validation_file",
343
+ (_F_VALIDATION_TOON,), _F_VALIDATION_TOON),
344
+ ("has_duplication_toon", "duplication_file",
345
+ (_F_DUPLICATION_TOON,), _F_DUPLICATION_TOON),
313
346
  ]
314
347
  _ACTIONABLE_KEYS = {"has_analysis_toon", "has_map_toon", "has_evolution_toon",
315
348
  "has_project_toon_yaml", "has_project_logic",
@@ -352,7 +385,8 @@ def _build_dynamic_focus_areas(file_analysis: dict) -> List[str]:
352
385
 
353
386
  if file_analysis["has_analysis_toon"]:
354
387
  focus_areas.append(
355
- f"1. **Code Health Analysis** - Review complexity metrics, god modules, coupling issues from {analysis_file}"
388
+ f"1. **Code Health Analysis** - Review complexity metrics, god modules,"
389
+ f" coupling issues from {analysis_file}"
356
390
  )
357
391
 
358
392
  if file_analysis["has_map_toon"]:
@@ -362,7 +396,8 @@ def _build_dynamic_focus_areas(file_analysis: dict) -> List[str]:
362
396
 
363
397
  if file_analysis["has_evolution_toon"]:
364
398
  focus_areas.append(
365
- f"3. **Refactoring Priorities** - Examine ranked refactoring actions and risk assessment from {evolution_file}"
399
+ f"3. **Refactoring Priorities** - Examine ranked refactoring actions"
400
+ f" and risk assessment from {evolution_file}"
366
401
  )
367
402
 
368
403
  if file_analysis.get("has_project_toon_yaml"):
@@ -377,7 +412,8 @@ def _build_dynamic_focus_areas(file_analysis: dict) -> List[str]:
377
412
 
378
413
  if file_analysis["has_validation_toon"]:
379
414
  focus_areas.append(
380
- f"6. **Validation Analysis** - Review validation results and issues identified by vallm from {validation_file}"
415
+ f"6. **Validation Analysis** - Review validation results and issues"
416
+ f" identified by vallm from {validation_file}"
381
417
  )
382
418
 
383
419
  if file_analysis["has_duplication_toon"]:
@@ -408,9 +444,12 @@ def _build_dynamic_tasks(file_analysis: dict) -> List[str]:
408
444
  project_logic_file = file_analysis.get("project_logic_file", "project.toon")
409
445
 
410
446
  tasks = [
411
- "- Treat this prompt as a refactoring brief: identify the highest-priority changes and prepare concrete edits.",
412
- "- Use the file set to decide whether the first pass should focus on correctness, duplication, complexity reduction, or architecture cleanup.",
413
- "- If you can safely implement the refactor, do it; otherwise give an exact file-by-file change plan and test plan.",
447
+ "- Treat this prompt as a refactoring brief: identify the highest-priority"
448
+ " changes and prepare concrete edits.",
449
+ "- Use the file set to decide whether the first pass should focus on"
450
+ " correctness, duplication, complexity reduction, or architecture cleanup.",
451
+ "- If you can safely implement the refactor, do it; otherwise give an exact"
452
+ " file-by-file change plan and test plan.",
414
453
  ]
415
454
 
416
455
  if file_analysis["has_analysis_toon"]:
@@ -57,7 +57,7 @@ Format Options (-f):
57
57
  code2logic — Generate project logic (legacy project.toon) via external code2logic
58
58
  project-yaml — Legacy project.yaml export (single source of truth) + generated views
59
59
  planfile — Planfile ticket suggestions (planfile-tickets.yaml); use --planfile-apply to create tickets
60
- all — Generate core formats (analysis.toon, map.toon.yaml, evolution.toon.yaml, context, mermaid, planfile-tickets.yaml) plus project.toon.yaml and prompt.txt; PNG remains opt-in via --png
60
+ all — Generate core formats (analysis.toon, map.toon.yaml, evolution.toon.yaml, context, mermaid, planfile-tickets.yaml) plus project.toon.yaml and prompt.txt; PNG remains opt-in via --png # noqa: E501
61
61
 
62
62
  Strategy Options (--strategy):
63
63
  quick — Fast overview, fewer files analyzed
@@ -13,8 +13,6 @@ from code2llm.core.lang._c_parser import _extract_declarations
13
13
  from code2llm.core.lang._complexity import calculate_complexity_regex
14
14
 
15
15
 
16
-
17
-
18
16
  def analyze_c_family(
19
17
  content: str,
20
18
  file_path: str,
@@ -43,7 +43,7 @@ def _init_tree_sitter() -> bool:
43
43
  """Initialize tree-sitter. Returns True if available."""
44
44
  global _TS_AVAILABLE
45
45
  try:
46
- import tree_sitter
46
+ import tree_sitter # noqa: F401
47
47
 
48
48
  _TS_AVAILABLE = True
49
49
  return True
@@ -13,20 +13,20 @@ def get_typescript_patterns() -> Dict[str, re.Pattern]:
13
13
  "import": re.compile(r"^\s*import\s+.*?\s+from\s+['\"]([^'\"]+)['\"]"),
14
14
  "decorator": re.compile(r"^\s*@(\w+(?:\.\w+)?)(?:\([^)]*\))?"),
15
15
  "class": re.compile(
16
- r"^\s*(?:export\s+)?(?:default\s+)?(?:abstract\s+)?class\s+(\w+)\s*(?:<[^>]+>)?(?:\s+extends\s+(\w+))?(?:\s+implements\s+([^{]+))?"
16
+ r"^\s*(?:export\s+)?(?:default\s+)?(?:abstract\s+)?class\s+(\w+)\s*(?:<[^>]+>)?(?:\s+extends\s+(\w+))?(?:\s+implements\s+([^{]+))?" # noqa: E501
17
17
  ),
18
18
  "interface": re.compile(r"^\s*(?:export\s+)?interface\s+(\w+)(?:<[^>]+>)?"),
19
19
  "function": re.compile(
20
20
  r"^\s*(?:export\s+)?(?:async\s+)?(?:function\s+(\w+)|(?:const|let|var)\s+(\w+)\s*=\s*(?:async\s+)?[\(\w])"
21
21
  ),
22
22
  "arrow_func": re.compile(
23
- r"^\s*(?:export\s+)?\s*(?:const|let|var)\s+(\w+)\s*(?::\s*[^=]+)?\s*=\s*(?:<[^>]+>\s*)?(?:async\s+)?\([^)]*\)\s*(?::\s*[^=]+)?\s*=>"
23
+ r"^\s*(?:export\s+)?\s*(?:const|let|var)\s+(\w+)\s*(?::\s*[^=]+)?\s*=\s*(?:<[^>]+>\s*)?(?:async\s+)?\([^)]*\)\s*(?::\s*[^=]+)?\s*=>" # noqa: E501
24
24
  ),
25
25
  "method": re.compile(
26
- r"^\s*(?:(?:public|private|protected|static|readonly|abstract|async|override)\s+)*(?:get\s+|set\s+)?(\w+)\s*(?:<[^>]*>)?\s*\([^)]*\)"
26
+ r"^\s*(?:(?:public|private|protected|static|readonly|abstract|async|override)\s+)*(?:get\s+|set\s+)?(\w+)\s*(?:<[^>]*>)?\s*\([^)]*\)" # noqa: E501
27
27
  ),
28
28
  "arrow_prop": re.compile(
29
- r"^\s*(?:(?:public|private|protected|static|readonly)\s+)*(\w+)\s*(?::\s*[^=]+)?\s*=\s*(?:<[^>]+>\s*)?(?:async\s+)?(?:\([^)]*\)|[a-zA-Z_]\w*)\s*=>"
29
+ r"^\s*(?:(?:public|private|protected|static|readonly)\s+)*(\w+)\s*(?::\s*[^=]+)?\s*=\s*(?:<[^>]+>\s*)?(?:async\s+)?(?:\([^)]*\)|[a-zA-Z_]\w*)\s*=>" # noqa: E501
30
30
  ),
31
31
  }
32
32
 
@@ -110,8 +110,10 @@ class StreamingAnalyzer:
110
110
  raw_files = self.scanner.collect_files(project_path)
111
111
  prioritized = self.prioritizer.prioritize_files(raw_files, project_path)
112
112
  total_files = len(prioritized)
113
- self._report_progress(phase="collect", current=0, total=total_files,
114
- message=f"Found {total_files} files to analyze")
113
+ self._report_progress(
114
+ phase="collect", current=0, total=total_files,
115
+ message=f"Found {total_files} files to analyze"
116
+ )
115
117
  quick_results: list = []
116
118
  processed = 0
117
119
  for event in self._phase_quick_scan(prioritized, start_time, total_files, quick_results):
@@ -159,7 +161,3 @@ class StreamingAnalyzer:
159
161
  "message": message,
160
162
  }
161
163
  )
162
-
163
-
164
- # Re-export for backward compatibility
165
- from .streaming import ScanStrategy
@@ -256,7 +256,9 @@ def manage_toon_size(
256
256
  print(f" - {prefix}.toon: {size_kb:.1f}KB (within {max_kb}KB limit)")
257
257
  else:
258
258
  print(
259
- f" - {prefix}.toon: {size_kb:.1f}KB (margin: {size_kb - max_kb:.1f}KB < {margin_kb:.0f}KB, keeping single file)"
259
+ f" - {prefix}.toon: {size_kb:.1f}KB"
260
+ f" (margin: {size_kb - max_kb:.1f}KB < {margin_kb:.0f}KB,"
261
+ " keeping single file)"
260
262
  )
261
263
  return [source_file]
262
264
 
@@ -153,7 +153,7 @@ class DashboardDataBuilder:
153
153
  color = _LANG_COLORS.get(lang, "#6b7280")
154
154
  html += f"""
155
155
  <tr>
156
- <td><span style="display:inline-block;width:8px;height:8px;border-radius:50%;background:{color};margin-right:6px"></span>{Path(path).name}</td>
156
+ <td><span style="display:inline-block;width:8px;height:8px;border-radius:50%;background:{color};margin-right:6px"></span>{Path(path).name}</td> # noqa: E501
157
157
  <td style="color:var(--muted);font-size:.75rem">{"/".join(Path(path).parts[:-1]) or "."}</td>
158
158
  <td style="text-align:right">{lines:,}</td>
159
159
  <td style="text-align:right">{methods}</td>
@@ -104,15 +104,15 @@ class DashboardRenderer:
104
104
  * {{ margin:0; padding:0; box-sizing:border-box; }}
105
105
  body {{ font-family: 'Segoe UI',system-ui,sans-serif; background:var(--bg); color:var(--text); padding:2rem; }}
106
106
  h1 {{ font-size:1.5rem; margin-bottom:.5rem; }}
107
- h2 {{ font-size:1.1rem; color:var(--muted); margin:1.5rem 0 .75rem; border-bottom:1px solid var(--border); padding-bottom:.25rem; }}
107
+ h2 {{ font-size:1.1rem; color:var(--muted); margin:1.5rem 0 .75rem; border-bottom:1px solid var(--border); padding-bottom:.25rem; }} # noqa: E501
108
108
  .grid {{ display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:1rem; margin:1rem 0; }}
109
109
  .card {{ background:var(--surface); border:1px solid var(--border); border-radius:.5rem; padding:1rem; }}
110
110
  .card .value {{ font-size:1.8rem; font-weight:700; }}
111
111
  .card .label {{ color:var(--muted); font-size:.8rem; text-transform:uppercase; }}
112
- .chart-container {{ background:var(--surface); border:1px solid var(--border); border-radius:.5rem; padding:1rem; margin:1rem 0; }}
112
+ .chart-container {{ background:var(--surface); border:1px solid var(--border); border-radius:.5rem; padding:1rem; margin:1rem 0; }} # noqa: E501
113
113
  .table-wrap {{ overflow-x:auto; }}
114
114
  table {{ width:100%; border-collapse:collapse; font-size:.85rem; }}
115
- th {{ text-align:left; color:var(--muted); padding:.5rem; border-bottom:1px solid var(--border); white-space:nowrap; }}
115
+ th {{ text-align:left; color:var(--muted); padding:.5rem; border-bottom:1px solid var(--border); white-space:nowrap; }} # noqa: E501
116
116
  td {{ padding:.5rem; border-bottom:1px solid var(--border); }}
117
117
  .badge {{ padding:.15rem .5rem; border-radius:.25rem; font-size:.75rem; font-weight:600; }}
118
118
  .badge.critical {{ background:var(--red); color:#fff; }}
@@ -130,7 +130,7 @@ class DashboardRenderer:
130
130
  .evo-cards {{ display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:.75rem; }}
131
131
  .evo-cards .card {{ text-align:center; }}
132
132
  .trend {{ font-size:.75rem; color:var(--muted); }}
133
- .lang-tag {{ display:inline-block; padding:.1rem .4rem; border-radius:.2rem; font-size:.7rem; font-weight:600; margin-right:.25rem; color:#fff; }}
133
+ .lang-tag {{ display:inline-block; padding:.1rem .4rem; border-radius:.2rem; font-size:.7rem; font-weight:600; margin-right:.25rem; color:#fff; }} # noqa: E501
134
134
  @media (max-width:768px) {{ .two-col,.three-col {{ grid-template-columns:1fr; }} }}
135
135
  footer {{ margin-top:2rem; color:var(--muted); font-size:.75rem; text-align:center; }}
136
136
  </style>
@@ -153,7 +153,7 @@ class DashboardRenderer:
153
153
  <div class="card"><div class="value">{stats.get("lines", 0):,}</div><div class="label">Lines</div></div>
154
154
  <div class="card"><div class="value">{len(lang["names"])}</div><div class="label">Languages</div></div>
155
155
  <div class="card"><div class="value">{cc_avg}</div><div class="label">Avg CC</div></div>
156
- <div class="card"><div class="value">{health.get("critical_count", 0)}</div><div class="label">Critical (CC≥{health.get("critical_limit", 10)})</div></div>
156
+ <div class="card"><div class="value">{health.get("critical_count", 0)}</div><div class="label">Critical (CC≥{health.get("critical_limit", 10)})</div></div> # noqa: E501
157
157
  <div class="card"><div class="value">{health.get("duplicates", 0)}</div><div class="label">Duplicates</div></div>
158
158
  <div class="card"><div class="value">{health.get("cycles", 0)}</div><div class="label">Cycles</div></div>
159
159
  </div>
@@ -179,8 +179,8 @@ class DashboardRenderer:
179
179
  <h2>Top Modules ({len(modules)})</h2>
180
180
  <div class="card"><div class="table-wrap">
181
181
  <table>
182
- <thead><tr><th>Module</th><th>Path</th><th style="text-align:right">Lines</th><th style="text-align:right">Funcs</th><th style="text-align:right">Classes</th><th style="text-align:right">CC max</th></tr></thead>
183
- <tbody>{top_modules_html if top_modules_html else '<tr><td colspan="6" style="color:var(--muted)">No modules</td></tr>'}</tbody>
182
+ <thead><tr><th>Module</th><th>Path</th><th style="text-align:right">Lines</th><th style="text-align:right">Funcs</th><th style="text-align:right">Classes</th><th style="text-align:right">CC max</th></tr></thead> # noqa: E501
183
+ <tbody>{top_modules_html if top_modules_html else '<tr><td colspan="6" style="color:var(--muted)">No modules</td></tr>'}</tbody> # noqa: E501
184
184
  </table>
185
185
  </div></div>
186
186
  </div>
@@ -200,7 +200,7 @@ class DashboardRenderer:
200
200
  <div class="card"><div class="table-wrap">
201
201
  <table>
202
202
  <thead><tr><th>Function</th><th>Fan-out</th><th>Note</th></tr></thead>
203
- <tbody>{hotspots_html if hotspots_html else '<tr><td colspan="3" style="color:var(--muted)">No hotspots</td></tr>'}</tbody>
203
+ <tbody>{hotspots_html if hotspots_html else '<tr><td colspan="3" style="color:var(--muted)">No hotspots</td></tr>'}</tbody> # noqa: E501
204
204
  </table>
205
205
  </div></div>
206
206
  </div>
@@ -210,7 +210,7 @@ class DashboardRenderer:
210
210
  <div class="card"><div class="table-wrap">
211
211
  <table>
212
212
  <thead><tr><th>#</th><th>Action</th><th>Impact</th><th>Effort</th></tr></thead>
213
- <tbody>{refactor_html if refactor_html else '<tr><td colspan="4" style="color:var(--muted)">No refactoring needed</td></tr>'}</tbody>
213
+ <tbody>{refactor_html if refactor_html else '<tr><td colspan="4" style="color:var(--muted)">No refactoring needed</td></tr>'}</tbody> # noqa: E501
214
214
  </table>
215
215
  </div></div>
216
216
  </div>
@@ -326,7 +326,7 @@ new Chart(modFuncsCtx, {{
326
326
  <div class="card"><div class="value">{crit}</div><div class="label">Critical {crit_trend}</div></div>
327
327
  <div class="card"><div class="value">{lines}</div><div class="label">Lines</div></div>
328
328
  </div>
329
- <p class="trend" style="margin-top:.5rem;">Run analysis multiple times to build a trend chart (≥3 data points needed).</p>
329
+ <p class="trend" style="margin-top:.5rem;">Run analysis multiple times to build a trend chart (≥3 data points needed).</p> # noqa: E501
330
330
  </div>"""
331
331
 
332
332
  @staticmethod
@@ -481,7 +481,7 @@ class HTMLRenderer:
481
481
  <div class="content-body" id="contentBody">
482
482
  <div class="welcome">
483
483
  <h2>Analysis Results</h2>
484
- <p>Select a file from the sidebar to view its contents. This interface works on GitHub Pages without any server required.</p>
484
+ <p>Select a file from the sidebar to view its contents. This interface works on GitHub Pages without any server required.</p> # noqa: E501
485
485
  <div class="stats-grid" id="statsGrid">
486
486
  <!-- Stats will be rendered here -->
487
487
  </div>
@@ -563,38 +563,38 @@ class HTMLRenderer:
563
563
  body.innerHTML = `<div class="markdown-content">${{marked.parse(file.content)}}</div>`;
564
564
  }} else if (file.type === 'html') {{
565
565
  // For HTML files, show in iframe for safety
566
- body.innerHTML = `<iframe src="${{file.rel_path}}" style="width:100%;height:100%;border:none;border-radius:0.5rem;"></iframe>`;
566
+ body.innerHTML = `<iframe src="${{file.rel_path}}" style="width:100%;height:100%;border:none;border-radius:0.5rem;"></iframe>`; # noqa: E501
567
567
  }} else if (file.type === 'image') {{
568
568
  // For images, display the actual image
569
- body.innerHTML = `<div class="image-preview"><img src="${{file.rel_path}}" alt="${{file.name}}" style="max-width:100%;max-height:100%;object-fit:contain;border-radius:0.5rem;"></div>`;
569
+ body.innerHTML = `<div class="image-preview"><img src="${{file.rel_path}}" alt="${{file.name}}" style="max-width:100%;max-height:100%;object-fit:contain;border-radius:0.5rem;"></div>`; # noqa: E501
570
570
  }} else if (file.type === 'mermaid') {{
571
571
  // Render mermaid diagram
572
572
  const diagramId = 'mermaid-diagram-' + Date.now();
573
- body.innerHTML = `<div class="mermaid-content"><pre class="mermaid" id="${{diagramId}}">${{file.content}}</pre></div>`;
573
+ body.innerHTML = `<div class="mermaid-content"><pre class="mermaid" id="${{diagramId}}">${{file.content}}</pre></div>`; # noqa: E501
574
574
  // Initialize mermaid on the new element
575
575
  setTimeout(() => {{
576
576
  mermaid.init(undefined, document.getElementById(diagramId));
577
577
  }}, 0);
578
578
  }} else if (file.type === 'json') {{
579
579
  try {{
580
- const json = JSON.parse(file.content.replace(/&lt;/g, '<').replace(/&gt;/g, '>').replace(/&amp;/g, '&'));
580
+ const json = JSON.parse(file.content.replace(/&lt;/g, '<').replace(/&gt;/g, '>').replace(/&amp;/g, '&')); # noqa: E501
581
581
  const formatted = JSON.stringify(json, null, 2);
582
- body.innerHTML = `<pre><code class="language-json">${{formatted.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;')}}</code></pre>`;
582
+ body.innerHTML = `<pre><code class="language-json">${{formatted.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;')}}</code></pre>`; # noqa: E501
583
583
  hljs.highlightElement(body.querySelector('code'));
584
584
  }} catch {{
585
585
  body.innerHTML = `<pre>${{file.content}}</pre>`;
586
586
  }}
587
587
  }} else if (file.type === 'yaml') {{
588
588
  // YAML with syntax highlighting
589
- body.innerHTML = `<pre><code class="language-yaml">${{file.content.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;')}}</code></pre>`;
589
+ body.innerHTML = `<pre><code class="language-yaml">${{file.content.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;')}}</code></pre>`; # noqa: E501
590
590
  hljs.highlightElement(body.querySelector('code'));
591
591
  }} else if (file.type === 'toon') {{
592
592
  // TOON with simple highlighting (use ini as closest match for key: value format)
593
- body.innerHTML = `<pre><code class="language-ini">${{file.content.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;')}}</code></pre>`;
593
+ body.innerHTML = `<pre><code class="language-ini">${{file.content.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;')}}</code></pre>`; # noqa: E501
594
594
  hljs.highlightElement(body.querySelector('code'));
595
595
  }} else if (file.type === 'code') {{
596
596
  // Code files with auto-highlighting
597
- body.innerHTML = `<pre><code>${{file.content.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;')}}</code></pre>`;
597
+ body.innerHTML = `<pre><code>${{file.content.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;')}}</code></pre>`; # noqa: E501
598
598
  hljs.highlightElement(body.querySelector('code'));
599
599
  }} else {{
600
600
  body.innerHTML = `<pre>${{file.content}}</pre>`;