thailint 0.15.1__tar.gz → 0.15.2__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 (226) hide show
  1. {thailint-0.15.1 → thailint-0.15.2}/PKG-INFO +3 -3
  2. {thailint-0.15.1 → thailint-0.15.2}/README.md +2 -2
  3. {thailint-0.15.1 → thailint-0.15.2}/pyproject.toml +1 -1
  4. {thailint-0.15.1 → thailint-0.15.2}/src/linters/srp/heuristics.py +47 -14
  5. {thailint-0.15.1 → thailint-0.15.2}/src/linters/srp/typescript_metrics_calculator.py +34 -10
  6. {thailint-0.15.1 → thailint-0.15.2}/CHANGELOG.md +0 -0
  7. {thailint-0.15.1 → thailint-0.15.2}/LICENSE +0 -0
  8. {thailint-0.15.1 → thailint-0.15.2}/src/__init__.py +0 -0
  9. {thailint-0.15.1 → thailint-0.15.2}/src/analyzers/__init__.py +0 -0
  10. {thailint-0.15.1 → thailint-0.15.2}/src/analyzers/ast_utils.py +0 -0
  11. {thailint-0.15.1 → thailint-0.15.2}/src/analyzers/rust_base.py +0 -0
  12. {thailint-0.15.1 → thailint-0.15.2}/src/analyzers/rust_context.py +0 -0
  13. {thailint-0.15.1 → thailint-0.15.2}/src/analyzers/typescript_base.py +0 -0
  14. {thailint-0.15.1 → thailint-0.15.2}/src/api.py +0 -0
  15. {thailint-0.15.1 → thailint-0.15.2}/src/cli/__init__.py +0 -0
  16. {thailint-0.15.1 → thailint-0.15.2}/src/cli/__main__.py +0 -0
  17. {thailint-0.15.1 → thailint-0.15.2}/src/cli/config.py +0 -0
  18. {thailint-0.15.1 → thailint-0.15.2}/src/cli/config_merge.py +0 -0
  19. {thailint-0.15.1 → thailint-0.15.2}/src/cli/linters/__init__.py +0 -0
  20. {thailint-0.15.1 → thailint-0.15.2}/src/cli/linters/code_patterns.py +0 -0
  21. {thailint-0.15.1 → thailint-0.15.2}/src/cli/linters/code_smells.py +0 -0
  22. {thailint-0.15.1 → thailint-0.15.2}/src/cli/linters/documentation.py +0 -0
  23. {thailint-0.15.1 → thailint-0.15.2}/src/cli/linters/performance.py +0 -0
  24. {thailint-0.15.1 → thailint-0.15.2}/src/cli/linters/shared.py +0 -0
  25. {thailint-0.15.1 → thailint-0.15.2}/src/cli/linters/structure.py +0 -0
  26. {thailint-0.15.1 → thailint-0.15.2}/src/cli/linters/structure_quality.py +0 -0
  27. {thailint-0.15.1 → thailint-0.15.2}/src/cli/main.py +0 -0
  28. {thailint-0.15.1 → thailint-0.15.2}/src/cli/utils.py +0 -0
  29. {thailint-0.15.1 → thailint-0.15.2}/src/cli_main.py +0 -0
  30. {thailint-0.15.1 → thailint-0.15.2}/src/config.py +0 -0
  31. {thailint-0.15.1 → thailint-0.15.2}/src/core/__init__.py +0 -0
  32. {thailint-0.15.1 → thailint-0.15.2}/src/core/base.py +0 -0
  33. {thailint-0.15.1 → thailint-0.15.2}/src/core/cli_utils.py +0 -0
  34. {thailint-0.15.1 → thailint-0.15.2}/src/core/config_parser.py +0 -0
  35. {thailint-0.15.1 → thailint-0.15.2}/src/core/constants.py +0 -0
  36. {thailint-0.15.1 → thailint-0.15.2}/src/core/linter_utils.py +0 -0
  37. {thailint-0.15.1 → thailint-0.15.2}/src/core/python_lint_rule.py +0 -0
  38. {thailint-0.15.1 → thailint-0.15.2}/src/core/registry.py +0 -0
  39. {thailint-0.15.1 → thailint-0.15.2}/src/core/rule_discovery.py +0 -0
  40. {thailint-0.15.1 → thailint-0.15.2}/src/core/types.py +0 -0
  41. {thailint-0.15.1 → thailint-0.15.2}/src/core/violation_builder.py +0 -0
  42. {thailint-0.15.1 → thailint-0.15.2}/src/core/violation_utils.py +0 -0
  43. {thailint-0.15.1 → thailint-0.15.2}/src/formatters/__init__.py +0 -0
  44. {thailint-0.15.1 → thailint-0.15.2}/src/formatters/sarif.py +0 -0
  45. {thailint-0.15.1 → thailint-0.15.2}/src/linter_config/__init__.py +0 -0
  46. {thailint-0.15.1 → thailint-0.15.2}/src/linter_config/directive_markers.py +0 -0
  47. {thailint-0.15.1 → thailint-0.15.2}/src/linter_config/ignore.py +0 -0
  48. {thailint-0.15.1 → thailint-0.15.2}/src/linter_config/loader.py +0 -0
  49. {thailint-0.15.1 → thailint-0.15.2}/src/linter_config/pattern_utils.py +0 -0
  50. {thailint-0.15.1 → thailint-0.15.2}/src/linter_config/rule_matcher.py +0 -0
  51. {thailint-0.15.1 → thailint-0.15.2}/src/linters/__init__.py +0 -0
  52. {thailint-0.15.1 → thailint-0.15.2}/src/linters/collection_pipeline/__init__.py +0 -0
  53. {thailint-0.15.1 → thailint-0.15.2}/src/linters/collection_pipeline/any_all_analyzer.py +0 -0
  54. {thailint-0.15.1 → thailint-0.15.2}/src/linters/collection_pipeline/ast_utils.py +0 -0
  55. {thailint-0.15.1 → thailint-0.15.2}/src/linters/collection_pipeline/config.py +0 -0
  56. {thailint-0.15.1 → thailint-0.15.2}/src/linters/collection_pipeline/continue_analyzer.py +0 -0
  57. {thailint-0.15.1 → thailint-0.15.2}/src/linters/collection_pipeline/detector.py +0 -0
  58. {thailint-0.15.1 → thailint-0.15.2}/src/linters/collection_pipeline/filter_map_analyzer.py +0 -0
  59. {thailint-0.15.1 → thailint-0.15.2}/src/linters/collection_pipeline/linter.py +0 -0
  60. {thailint-0.15.1 → thailint-0.15.2}/src/linters/collection_pipeline/suggestion_builder.py +0 -0
  61. {thailint-0.15.1 → thailint-0.15.2}/src/linters/cqs/__init__.py +0 -0
  62. {thailint-0.15.1 → thailint-0.15.2}/src/linters/cqs/config.py +0 -0
  63. {thailint-0.15.1 → thailint-0.15.2}/src/linters/cqs/function_analyzer.py +0 -0
  64. {thailint-0.15.1 → thailint-0.15.2}/src/linters/cqs/input_detector.py +0 -0
  65. {thailint-0.15.1 → thailint-0.15.2}/src/linters/cqs/linter.py +0 -0
  66. {thailint-0.15.1 → thailint-0.15.2}/src/linters/cqs/output_detector.py +0 -0
  67. {thailint-0.15.1 → thailint-0.15.2}/src/linters/cqs/python_analyzer.py +0 -0
  68. {thailint-0.15.1 → thailint-0.15.2}/src/linters/cqs/types.py +0 -0
  69. {thailint-0.15.1 → thailint-0.15.2}/src/linters/cqs/typescript_cqs_analyzer.py +0 -0
  70. {thailint-0.15.1 → thailint-0.15.2}/src/linters/cqs/typescript_function_analyzer.py +0 -0
  71. {thailint-0.15.1 → thailint-0.15.2}/src/linters/cqs/typescript_input_detector.py +0 -0
  72. {thailint-0.15.1 → thailint-0.15.2}/src/linters/cqs/typescript_output_detector.py +0 -0
  73. {thailint-0.15.1 → thailint-0.15.2}/src/linters/cqs/violation_builder.py +0 -0
  74. {thailint-0.15.1 → thailint-0.15.2}/src/linters/dry/__init__.py +0 -0
  75. {thailint-0.15.1 → thailint-0.15.2}/src/linters/dry/base_token_analyzer.py +0 -0
  76. {thailint-0.15.1 → thailint-0.15.2}/src/linters/dry/block_filter.py +0 -0
  77. {thailint-0.15.1 → thailint-0.15.2}/src/linters/dry/block_grouper.py +0 -0
  78. {thailint-0.15.1 → thailint-0.15.2}/src/linters/dry/cache.py +0 -0
  79. {thailint-0.15.1 → thailint-0.15.2}/src/linters/dry/cache_query.py +0 -0
  80. {thailint-0.15.1 → thailint-0.15.2}/src/linters/dry/config.py +0 -0
  81. {thailint-0.15.1 → thailint-0.15.2}/src/linters/dry/config_loader.py +0 -0
  82. {thailint-0.15.1 → thailint-0.15.2}/src/linters/dry/constant.py +0 -0
  83. {thailint-0.15.1 → thailint-0.15.2}/src/linters/dry/constant_matcher.py +0 -0
  84. {thailint-0.15.1 → thailint-0.15.2}/src/linters/dry/constant_violation_builder.py +0 -0
  85. {thailint-0.15.1 → thailint-0.15.2}/src/linters/dry/deduplicator.py +0 -0
  86. {thailint-0.15.1 → thailint-0.15.2}/src/linters/dry/duplicate_storage.py +0 -0
  87. {thailint-0.15.1 → thailint-0.15.2}/src/linters/dry/file_analyzer.py +0 -0
  88. {thailint-0.15.1 → thailint-0.15.2}/src/linters/dry/inline_ignore.py +0 -0
  89. {thailint-0.15.1 → thailint-0.15.2}/src/linters/dry/linter.py +0 -0
  90. {thailint-0.15.1 → thailint-0.15.2}/src/linters/dry/python_analyzer.py +0 -0
  91. {thailint-0.15.1 → thailint-0.15.2}/src/linters/dry/python_constant_extractor.py +0 -0
  92. {thailint-0.15.1 → thailint-0.15.2}/src/linters/dry/single_statement_detector.py +0 -0
  93. {thailint-0.15.1 → thailint-0.15.2}/src/linters/dry/storage_initializer.py +0 -0
  94. {thailint-0.15.1 → thailint-0.15.2}/src/linters/dry/token_hasher.py +0 -0
  95. {thailint-0.15.1 → thailint-0.15.2}/src/linters/dry/typescript_analyzer.py +0 -0
  96. {thailint-0.15.1 → thailint-0.15.2}/src/linters/dry/typescript_constant_extractor.py +0 -0
  97. {thailint-0.15.1 → thailint-0.15.2}/src/linters/dry/typescript_statement_detector.py +0 -0
  98. {thailint-0.15.1 → thailint-0.15.2}/src/linters/dry/typescript_value_extractor.py +0 -0
  99. {thailint-0.15.1 → thailint-0.15.2}/src/linters/dry/violation_builder.py +0 -0
  100. {thailint-0.15.1 → thailint-0.15.2}/src/linters/dry/violation_filter.py +0 -0
  101. {thailint-0.15.1 → thailint-0.15.2}/src/linters/dry/violation_generator.py +0 -0
  102. {thailint-0.15.1 → thailint-0.15.2}/src/linters/file_header/__init__.py +0 -0
  103. {thailint-0.15.1 → thailint-0.15.2}/src/linters/file_header/atemporal_detector.py +0 -0
  104. {thailint-0.15.1 → thailint-0.15.2}/src/linters/file_header/base_parser.py +0 -0
  105. {thailint-0.15.1 → thailint-0.15.2}/src/linters/file_header/bash_parser.py +0 -0
  106. {thailint-0.15.1 → thailint-0.15.2}/src/linters/file_header/config.py +0 -0
  107. {thailint-0.15.1 → thailint-0.15.2}/src/linters/file_header/css_parser.py +0 -0
  108. {thailint-0.15.1 → thailint-0.15.2}/src/linters/file_header/field_validator.py +0 -0
  109. {thailint-0.15.1 → thailint-0.15.2}/src/linters/file_header/linter.py +0 -0
  110. {thailint-0.15.1 → thailint-0.15.2}/src/linters/file_header/markdown_parser.py +0 -0
  111. {thailint-0.15.1 → thailint-0.15.2}/src/linters/file_header/python_parser.py +0 -0
  112. {thailint-0.15.1 → thailint-0.15.2}/src/linters/file_header/typescript_parser.py +0 -0
  113. {thailint-0.15.1 → thailint-0.15.2}/src/linters/file_header/violation_builder.py +0 -0
  114. {thailint-0.15.1 → thailint-0.15.2}/src/linters/file_placement/__init__.py +0 -0
  115. {thailint-0.15.1 → thailint-0.15.2}/src/linters/file_placement/config_loader.py +0 -0
  116. {thailint-0.15.1 → thailint-0.15.2}/src/linters/file_placement/directory_matcher.py +0 -0
  117. {thailint-0.15.1 → thailint-0.15.2}/src/linters/file_placement/linter.py +0 -0
  118. {thailint-0.15.1 → thailint-0.15.2}/src/linters/file_placement/path_resolver.py +0 -0
  119. {thailint-0.15.1 → thailint-0.15.2}/src/linters/file_placement/pattern_matcher.py +0 -0
  120. {thailint-0.15.1 → thailint-0.15.2}/src/linters/file_placement/pattern_validator.py +0 -0
  121. {thailint-0.15.1 → thailint-0.15.2}/src/linters/file_placement/rule_checker.py +0 -0
  122. {thailint-0.15.1 → thailint-0.15.2}/src/linters/file_placement/violation_factory.py +0 -0
  123. {thailint-0.15.1 → thailint-0.15.2}/src/linters/lazy_ignores/__init__.py +0 -0
  124. {thailint-0.15.1 → thailint-0.15.2}/src/linters/lazy_ignores/config.py +0 -0
  125. {thailint-0.15.1 → thailint-0.15.2}/src/linters/lazy_ignores/directive_utils.py +0 -0
  126. {thailint-0.15.1 → thailint-0.15.2}/src/linters/lazy_ignores/header_parser.py +0 -0
  127. {thailint-0.15.1 → thailint-0.15.2}/src/linters/lazy_ignores/linter.py +0 -0
  128. {thailint-0.15.1 → thailint-0.15.2}/src/linters/lazy_ignores/matcher.py +0 -0
  129. {thailint-0.15.1 → thailint-0.15.2}/src/linters/lazy_ignores/python_analyzer.py +0 -0
  130. {thailint-0.15.1 → thailint-0.15.2}/src/linters/lazy_ignores/rule_id_utils.py +0 -0
  131. {thailint-0.15.1 → thailint-0.15.2}/src/linters/lazy_ignores/skip_detector.py +0 -0
  132. {thailint-0.15.1 → thailint-0.15.2}/src/linters/lazy_ignores/types.py +0 -0
  133. {thailint-0.15.1 → thailint-0.15.2}/src/linters/lazy_ignores/typescript_analyzer.py +0 -0
  134. {thailint-0.15.1 → thailint-0.15.2}/src/linters/lazy_ignores/violation_builder.py +0 -0
  135. {thailint-0.15.1 → thailint-0.15.2}/src/linters/lbyl/__init__.py +0 -0
  136. {thailint-0.15.1 → thailint-0.15.2}/src/linters/lbyl/config.py +0 -0
  137. {thailint-0.15.1 → thailint-0.15.2}/src/linters/lbyl/linter.py +0 -0
  138. {thailint-0.15.1 → thailint-0.15.2}/src/linters/lbyl/pattern_detectors/__init__.py +0 -0
  139. {thailint-0.15.1 → thailint-0.15.2}/src/linters/lbyl/pattern_detectors/base.py +0 -0
  140. {thailint-0.15.1 → thailint-0.15.2}/src/linters/lbyl/pattern_detectors/dict_key_detector.py +0 -0
  141. {thailint-0.15.1 → thailint-0.15.2}/src/linters/lbyl/pattern_detectors/division_check_detector.py +0 -0
  142. {thailint-0.15.1 → thailint-0.15.2}/src/linters/lbyl/pattern_detectors/file_exists_detector.py +0 -0
  143. {thailint-0.15.1 → thailint-0.15.2}/src/linters/lbyl/pattern_detectors/hasattr_detector.py +0 -0
  144. {thailint-0.15.1 → thailint-0.15.2}/src/linters/lbyl/pattern_detectors/isinstance_detector.py +0 -0
  145. {thailint-0.15.1 → thailint-0.15.2}/src/linters/lbyl/pattern_detectors/len_check_detector.py +0 -0
  146. {thailint-0.15.1 → thailint-0.15.2}/src/linters/lbyl/pattern_detectors/none_check_detector.py +0 -0
  147. {thailint-0.15.1 → thailint-0.15.2}/src/linters/lbyl/pattern_detectors/string_validator_detector.py +0 -0
  148. {thailint-0.15.1 → thailint-0.15.2}/src/linters/lbyl/python_analyzer.py +0 -0
  149. {thailint-0.15.1 → thailint-0.15.2}/src/linters/lbyl/violation_builder.py +0 -0
  150. {thailint-0.15.1 → thailint-0.15.2}/src/linters/magic_numbers/__init__.py +0 -0
  151. {thailint-0.15.1 → thailint-0.15.2}/src/linters/magic_numbers/config.py +0 -0
  152. {thailint-0.15.1 → thailint-0.15.2}/src/linters/magic_numbers/context_analyzer.py +0 -0
  153. {thailint-0.15.1 → thailint-0.15.2}/src/linters/magic_numbers/linter.py +0 -0
  154. {thailint-0.15.1 → thailint-0.15.2}/src/linters/magic_numbers/python_analyzer.py +0 -0
  155. {thailint-0.15.1 → thailint-0.15.2}/src/linters/magic_numbers/typescript_analyzer.py +0 -0
  156. {thailint-0.15.1 → thailint-0.15.2}/src/linters/magic_numbers/typescript_ignore_checker.py +0 -0
  157. {thailint-0.15.1 → thailint-0.15.2}/src/linters/magic_numbers/violation_builder.py +0 -0
  158. {thailint-0.15.1 → thailint-0.15.2}/src/linters/method_property/__init__.py +0 -0
  159. {thailint-0.15.1 → thailint-0.15.2}/src/linters/method_property/config.py +0 -0
  160. {thailint-0.15.1 → thailint-0.15.2}/src/linters/method_property/linter.py +0 -0
  161. {thailint-0.15.1 → thailint-0.15.2}/src/linters/method_property/python_analyzer.py +0 -0
  162. {thailint-0.15.1 → thailint-0.15.2}/src/linters/method_property/violation_builder.py +0 -0
  163. {thailint-0.15.1 → thailint-0.15.2}/src/linters/nesting/__init__.py +0 -0
  164. {thailint-0.15.1 → thailint-0.15.2}/src/linters/nesting/config.py +0 -0
  165. {thailint-0.15.1 → thailint-0.15.2}/src/linters/nesting/linter.py +0 -0
  166. {thailint-0.15.1 → thailint-0.15.2}/src/linters/nesting/python_analyzer.py +0 -0
  167. {thailint-0.15.1 → thailint-0.15.2}/src/linters/nesting/typescript_analyzer.py +0 -0
  168. {thailint-0.15.1 → thailint-0.15.2}/src/linters/nesting/typescript_function_extractor.py +0 -0
  169. {thailint-0.15.1 → thailint-0.15.2}/src/linters/nesting/violation_builder.py +0 -0
  170. {thailint-0.15.1 → thailint-0.15.2}/src/linters/performance/__init__.py +0 -0
  171. {thailint-0.15.1 → thailint-0.15.2}/src/linters/performance/config.py +0 -0
  172. {thailint-0.15.1 → thailint-0.15.2}/src/linters/performance/constants.py +0 -0
  173. {thailint-0.15.1 → thailint-0.15.2}/src/linters/performance/linter.py +0 -0
  174. {thailint-0.15.1 → thailint-0.15.2}/src/linters/performance/python_analyzer.py +0 -0
  175. {thailint-0.15.1 → thailint-0.15.2}/src/linters/performance/regex_analyzer.py +0 -0
  176. {thailint-0.15.1 → thailint-0.15.2}/src/linters/performance/regex_linter.py +0 -0
  177. {thailint-0.15.1 → thailint-0.15.2}/src/linters/performance/typescript_analyzer.py +0 -0
  178. {thailint-0.15.1 → thailint-0.15.2}/src/linters/performance/violation_builder.py +0 -0
  179. {thailint-0.15.1 → thailint-0.15.2}/src/linters/print_statements/__init__.py +0 -0
  180. {thailint-0.15.1 → thailint-0.15.2}/src/linters/print_statements/config.py +0 -0
  181. {thailint-0.15.1 → thailint-0.15.2}/src/linters/print_statements/linter.py +0 -0
  182. {thailint-0.15.1 → thailint-0.15.2}/src/linters/print_statements/python_analyzer.py +0 -0
  183. {thailint-0.15.1 → thailint-0.15.2}/src/linters/print_statements/typescript_analyzer.py +0 -0
  184. {thailint-0.15.1 → thailint-0.15.2}/src/linters/print_statements/violation_builder.py +0 -0
  185. {thailint-0.15.1 → thailint-0.15.2}/src/linters/srp/__init__.py +0 -0
  186. {thailint-0.15.1 → thailint-0.15.2}/src/linters/srp/class_analyzer.py +0 -0
  187. {thailint-0.15.1 → thailint-0.15.2}/src/linters/srp/config.py +0 -0
  188. {thailint-0.15.1 → thailint-0.15.2}/src/linters/srp/linter.py +0 -0
  189. {thailint-0.15.1 → thailint-0.15.2}/src/linters/srp/metrics_evaluator.py +0 -0
  190. {thailint-0.15.1 → thailint-0.15.2}/src/linters/srp/python_analyzer.py +0 -0
  191. {thailint-0.15.1 → thailint-0.15.2}/src/linters/srp/typescript_analyzer.py +0 -0
  192. {thailint-0.15.1 → thailint-0.15.2}/src/linters/srp/violation_builder.py +0 -0
  193. {thailint-0.15.1 → thailint-0.15.2}/src/linters/stateless_class/__init__.py +0 -0
  194. {thailint-0.15.1 → thailint-0.15.2}/src/linters/stateless_class/config.py +0 -0
  195. {thailint-0.15.1 → thailint-0.15.2}/src/linters/stateless_class/linter.py +0 -0
  196. {thailint-0.15.1 → thailint-0.15.2}/src/linters/stateless_class/python_analyzer.py +0 -0
  197. {thailint-0.15.1 → thailint-0.15.2}/src/linters/stringly_typed/__init__.py +0 -0
  198. {thailint-0.15.1 → thailint-0.15.2}/src/linters/stringly_typed/config.py +0 -0
  199. {thailint-0.15.1 → thailint-0.15.2}/src/linters/stringly_typed/context_filter.py +0 -0
  200. {thailint-0.15.1 → thailint-0.15.2}/src/linters/stringly_typed/function_call_violation_builder.py +0 -0
  201. {thailint-0.15.1 → thailint-0.15.2}/src/linters/stringly_typed/ignore_checker.py +0 -0
  202. {thailint-0.15.1 → thailint-0.15.2}/src/linters/stringly_typed/ignore_utils.py +0 -0
  203. {thailint-0.15.1 → thailint-0.15.2}/src/linters/stringly_typed/linter.py +0 -0
  204. {thailint-0.15.1 → thailint-0.15.2}/src/linters/stringly_typed/python/__init__.py +0 -0
  205. {thailint-0.15.1 → thailint-0.15.2}/src/linters/stringly_typed/python/analyzer.py +0 -0
  206. {thailint-0.15.1 → thailint-0.15.2}/src/linters/stringly_typed/python/call_tracker.py +0 -0
  207. {thailint-0.15.1 → thailint-0.15.2}/src/linters/stringly_typed/python/comparison_tracker.py +0 -0
  208. {thailint-0.15.1 → thailint-0.15.2}/src/linters/stringly_typed/python/condition_extractor.py +0 -0
  209. {thailint-0.15.1 → thailint-0.15.2}/src/linters/stringly_typed/python/conditional_detector.py +0 -0
  210. {thailint-0.15.1 → thailint-0.15.2}/src/linters/stringly_typed/python/constants.py +0 -0
  211. {thailint-0.15.1 → thailint-0.15.2}/src/linters/stringly_typed/python/match_analyzer.py +0 -0
  212. {thailint-0.15.1 → thailint-0.15.2}/src/linters/stringly_typed/python/validation_detector.py +0 -0
  213. {thailint-0.15.1 → thailint-0.15.2}/src/linters/stringly_typed/python/variable_extractor.py +0 -0
  214. {thailint-0.15.1 → thailint-0.15.2}/src/linters/stringly_typed/storage.py +0 -0
  215. {thailint-0.15.1 → thailint-0.15.2}/src/linters/stringly_typed/storage_initializer.py +0 -0
  216. {thailint-0.15.1 → thailint-0.15.2}/src/linters/stringly_typed/typescript/__init__.py +0 -0
  217. {thailint-0.15.1 → thailint-0.15.2}/src/linters/stringly_typed/typescript/analyzer.py +0 -0
  218. {thailint-0.15.1 → thailint-0.15.2}/src/linters/stringly_typed/typescript/call_tracker.py +0 -0
  219. {thailint-0.15.1 → thailint-0.15.2}/src/linters/stringly_typed/typescript/comparison_tracker.py +0 -0
  220. {thailint-0.15.1 → thailint-0.15.2}/src/linters/stringly_typed/violation_generator.py +0 -0
  221. {thailint-0.15.1 → thailint-0.15.2}/src/orchestrator/__init__.py +0 -0
  222. {thailint-0.15.1 → thailint-0.15.2}/src/orchestrator/core.py +0 -0
  223. {thailint-0.15.1 → thailint-0.15.2}/src/orchestrator/language_detector.py +0 -0
  224. {thailint-0.15.1 → thailint-0.15.2}/src/templates/thailint_config_template.yaml +0 -0
  225. {thailint-0.15.1 → thailint-0.15.2}/src/utils/__init__.py +0 -0
  226. {thailint-0.15.1 → thailint-0.15.2}/src/utils/project_root.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: thailint
3
- Version: 0.15.1
3
+ Version: 0.15.2
4
4
  Summary: The AI Linter - Enterprise-grade linting and governance for AI-generated code across multiple languages
5
5
  License: MIT
6
6
  License-File: LICENSE
@@ -38,7 +38,7 @@ Description-Content-Type: text/markdown
38
38
 
39
39
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
40
40
  [![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
41
- [![PyPI](https://img.shields.io/pypi/v/thai-lint)](https://pypi.org/project/thai-lint/)
41
+ [![PyPI](https://img.shields.io/pypi/v/thailint)](https://pypi.org/project/thailint/)
42
42
  [![Documentation](https://readthedocs.org/projects/thai-lint/badge/?version=latest)](https://thai-lint.readthedocs.io/)
43
43
 
44
44
  **The AI Linter** - Catch the mistakes AI coding assistants keep making.
@@ -48,7 +48,7 @@ thailint detects anti-patterns that AI tools frequently introduce: duplicate cod
48
48
  ## Installation
49
49
 
50
50
  ```bash
51
- pip install thai-lint
51
+ pip install thailint
52
52
  ```
53
53
 
54
54
  Or with Docker:
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
4
4
  [![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
5
- [![PyPI](https://img.shields.io/pypi/v/thai-lint)](https://pypi.org/project/thai-lint/)
5
+ [![PyPI](https://img.shields.io/pypi/v/thailint)](https://pypi.org/project/thailint/)
6
6
  [![Documentation](https://readthedocs.org/projects/thai-lint/badge/?version=latest)](https://thai-lint.readthedocs.io/)
7
7
 
8
8
  **The AI Linter** - Catch the mistakes AI coding assistants keep making.
@@ -12,7 +12,7 @@ thailint detects anti-patterns that AI tools frequently introduce: duplicate cod
12
12
  ## Installation
13
13
 
14
14
  ```bash
15
- pip install thai-lint
15
+ pip install thailint
16
16
  ```
17
17
 
18
18
  Or with Docker:
@@ -17,7 +17,7 @@ build-backend = "poetry.core.masonry.api"
17
17
 
18
18
  [tool.poetry]
19
19
  name = "thailint"
20
- version = "0.15.1"
20
+ version = "0.15.2"
21
21
  description = "The AI Linter - Enterprise-grade linting and governance for AI-generated code across multiple languages"
22
22
  authors = ["Steve Jackson"]
23
23
  license = "MIT"
@@ -4,12 +4,13 @@ Purpose: SRP detection heuristics for analyzing code complexity and responsibili
4
4
  Scope: Helper functions for method counting, LOC calculation, and keyword detection
5
5
 
6
6
  Overview: Provides heuristic-based analysis functions for detecting Single Responsibility
7
- Principle violations. Implements method counting that excludes property decorators and
8
- special methods. Provides LOC calculation that filters out blank lines and comments.
9
- Includes keyword detection for identifying generic class names that often indicate SRP
10
- violations (Manager, Handler, etc.). Supports both Python AST and TypeScript tree-sitter
11
- nodes. These heuristics enable practical SRP detection without requiring perfect semantic
12
- analysis, focusing on measurable code metrics that correlate with responsibility scope.
7
+ Principle violations. Implements method counting that excludes property decorators,
8
+ private methods, and special methods. Provides LOC calculation that filters out blank
9
+ lines and comments. Includes keyword detection for identifying generic class names that
10
+ often indicate SRP violations (Manager, Handler, etc.). Supports both Python AST and
11
+ TypeScript tree-sitter nodes. These heuristics enable practical SRP detection without
12
+ requiring perfect semantic analysis, focusing on measurable code metrics that correlate
13
+ with responsibility scope.
13
14
 
14
15
  Dependencies: ast module for Python AST analysis, typing for type hints
15
16
 
@@ -24,23 +25,55 @@ import ast
24
25
 
25
26
 
26
27
  def count_methods(class_node: ast.ClassDef) -> int:
27
- """Count methods in a class (excludes properties and special methods).
28
+ """Count public methods in a class (excludes properties and private methods).
29
+
30
+ Private methods are those starting with underscore (_), including dunder
31
+ methods (__init__, __str__, etc.). This focuses SRP analysis on the public
32
+ interface rather than implementation details.
28
33
 
29
34
  Args:
30
35
  class_node: AST node representing a class definition
31
36
 
32
37
  Returns:
33
- Number of methods in the class
38
+ Number of public methods in the class
34
39
  """
35
- methods = 0
36
40
  func_nodes = (
37
41
  n for n in class_node.body if isinstance(n, (ast.FunctionDef, ast.AsyncFunctionDef))
38
42
  )
39
- for node in func_nodes:
40
- # Don't count @property decorators as methods
41
- if not has_property_decorator(node):
42
- methods += 1
43
- return methods
43
+ public_methods = [n for n in func_nodes if _is_countable_method(n)]
44
+ return len(public_methods)
45
+
46
+
47
+ def _is_countable_method(node: ast.FunctionDef | ast.AsyncFunctionDef) -> bool:
48
+ """Check if a method should be counted (public and not a property).
49
+
50
+ Args:
51
+ node: Function AST node
52
+
53
+ Returns:
54
+ True if method should be counted
55
+ """
56
+ if has_property_decorator(node):
57
+ return False
58
+ if _is_private_method(node.name):
59
+ return False
60
+ return True
61
+
62
+
63
+ def _is_private_method(method_name: str) -> bool:
64
+ """Check if method is private (starts with underscore).
65
+
66
+ This includes both single underscore (_helper) and dunder methods
67
+ (__init__, __str__). All underscore-prefixed methods are considered
68
+ implementation details.
69
+
70
+ Args:
71
+ method_name: Name of the method to check
72
+
73
+ Returns:
74
+ True if method is private, False otherwise
75
+ """
76
+ return method_name.startswith("_")
44
77
 
45
78
 
46
79
  def count_loc(class_node: ast.ClassDef, source: str) -> int:
@@ -4,9 +4,10 @@ Purpose: TypeScript class metrics calculation for SRP analysis
4
4
  Scope: Calculates method count and lines of code for TypeScript classes
5
5
 
6
6
  Overview: Provides metrics calculation functionality for TypeScript classes in SRP analysis. Counts
7
- public methods in class bodies (excludes constructors), calculates lines of code from AST node
8
- positions, and identifies class body nodes. Uses tree-sitter AST node types. Isolates metrics
9
- calculation from class analysis and tree traversal logic.
7
+ public methods in class bodies (excludes constructors and private methods starting with _),
8
+ calculates lines of code from AST node positions, and identifies class body nodes. Uses
9
+ tree-sitter AST node types. Isolates metrics calculation from class analysis and tree
10
+ traversal logic.
10
11
 
11
12
  Dependencies: typing
12
13
 
@@ -72,22 +73,45 @@ def _get_class_body(class_node: Any) -> Any:
72
73
 
73
74
 
74
75
  def _is_countable_method(node: Any) -> bool:
75
- """Check if node is a method that should be counted.
76
+ """Check if node is a public method that should be counted.
77
+
78
+ Excludes constructors and private methods (names starting with _).
76
79
 
77
80
  Args:
78
81
  node: Tree-sitter node to check
79
82
 
80
83
  Returns:
81
- True if node is a countable method
84
+ True if node is a countable public method
82
85
  """
83
86
  if node.type != "method_definition":
84
87
  return False
85
88
 
86
- # Check if it's a constructor
87
- return all(
88
- not (child.type == "property_identifier" and child.text.decode() == "constructor")
89
- for child in node.children
90
- )
89
+ method_name = _get_method_name(node)
90
+
91
+ # Don't count constructors
92
+ if method_name == "constructor":
93
+ return False
94
+
95
+ # Don't count private methods (underscore prefix convention)
96
+ if method_name and method_name.startswith("_"):
97
+ return False
98
+
99
+ return True
100
+
101
+
102
+ def _get_method_name(node: Any) -> str | None:
103
+ """Extract method name from method_definition node.
104
+
105
+ Args:
106
+ node: Method definition tree-sitter node
107
+
108
+ Returns:
109
+ Method name or None if not found
110
+ """
111
+ for child in node.children:
112
+ if child.type == "property_identifier":
113
+ return child.text.decode()
114
+ return None
91
115
 
92
116
 
93
117
  # Legacy class wrapper for backward compatibility
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