crackerjack 0.25.0__tar.gz → 0.27.0__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.

Potentially problematic release.


This version of crackerjack might be problematic. Click here for more details.

Files changed (46) hide show
  1. {crackerjack-0.25.0/crackerjack → crackerjack-0.27.0}/.gitignore +11 -0
  2. {crackerjack-0.25.0 → crackerjack-0.27.0}/.pre-commit-config-ai.yaml +60 -33
  3. crackerjack-0.27.0/.pre-commit-config-fast.yaml +69 -0
  4. {crackerjack-0.25.0 → crackerjack-0.27.0}/.pre-commit-config.yaml +31 -5
  5. {crackerjack-0.25.0 → crackerjack-0.27.0}/CLAUDE.md +337 -34
  6. {crackerjack-0.25.0 → crackerjack-0.27.0}/PKG-INFO +188 -128
  7. {crackerjack-0.25.0 → crackerjack-0.27.0}/README-AI-AGENT.md +29 -20
  8. {crackerjack-0.25.0 → crackerjack-0.27.0}/README.md +185 -127
  9. {crackerjack-0.25.0 → crackerjack-0.27.0}/RULES.md +21 -0
  10. {crackerjack-0.25.0 → crackerjack-0.27.0/crackerjack}/.gitignore +11 -0
  11. {crackerjack-0.25.0 → crackerjack-0.27.0}/crackerjack/.pre-commit-config-ai.yaml +60 -33
  12. {crackerjack-0.25.0 → crackerjack-0.27.0}/crackerjack/.pre-commit-config.yaml +31 -5
  13. {crackerjack-0.25.0 → crackerjack-0.27.0}/crackerjack/__main__.py +22 -1
  14. crackerjack-0.27.0/crackerjack/crackerjack.py +2597 -0
  15. {crackerjack-0.25.0 → crackerjack-0.27.0}/crackerjack/pyproject.toml +71 -30
  16. {crackerjack-0.25.0 → crackerjack-0.27.0}/pyproject.toml +71 -30
  17. {crackerjack-0.25.0 → crackerjack-0.27.0}/tests/TESTING.md +17 -17
  18. {crackerjack-0.25.0 → crackerjack-0.27.0}/tests/test_crackerjack.py +22 -12
  19. {crackerjack-0.25.0 → crackerjack-0.27.0}/tests/test_crackerjack_runner.py +1 -0
  20. {crackerjack-0.25.0 → crackerjack-0.27.0}/tests/test_structured_errors.py +2 -0
  21. {crackerjack-0.25.0 → crackerjack-0.27.0}/uv.lock +56 -22
  22. crackerjack-0.25.0/crackerjack/crackerjack.py +0 -1276
  23. {crackerjack-0.25.0 → crackerjack-0.27.0}/.envrc +0 -0
  24. {crackerjack-0.25.0 → crackerjack-0.27.0}/.github/FUNDING.yml +0 -0
  25. {crackerjack-0.25.0 → crackerjack-0.27.0}/.libcst.codemod.yaml +0 -0
  26. {crackerjack-0.25.0 → crackerjack-0.27.0}/LICENSE +0 -0
  27. {crackerjack-0.25.0 → crackerjack-0.27.0}/crackerjack/.libcst.codemod.yaml +0 -0
  28. {crackerjack-0.25.0 → crackerjack-0.27.0}/crackerjack/.pdm.toml +0 -0
  29. {crackerjack-0.25.0 → crackerjack-0.27.0}/crackerjack/__init__.py +0 -0
  30. {crackerjack-0.25.0 → crackerjack-0.27.0}/crackerjack/errors.py +0 -0
  31. {crackerjack-0.25.0 → crackerjack-0.27.0}/crackerjack/interactive.py +0 -0
  32. {crackerjack-0.25.0 → crackerjack-0.27.0}/crackerjack/py313.py +0 -0
  33. {crackerjack-0.25.0 → crackerjack-0.27.0}/tests/__init__.py +0 -0
  34. {crackerjack-0.25.0 → crackerjack-0.27.0}/tests/conftest.py +0 -0
  35. {crackerjack-0.25.0 → crackerjack-0.27.0}/tests/data/comments_sample.txt +0 -0
  36. {crackerjack-0.25.0 → crackerjack-0.27.0}/tests/data/docstrings_sample.txt +0 -0
  37. {crackerjack-0.25.0 → crackerjack-0.27.0}/tests/data/expected_comments_sample.txt +0 -0
  38. {crackerjack-0.25.0 → crackerjack-0.27.0}/tests/data/init.py +0 -0
  39. {crackerjack-0.25.0 → crackerjack-0.27.0}/tests/test_errors.py +0 -0
  40. {crackerjack-0.25.0 → crackerjack-0.27.0}/tests/test_interactive.py +0 -0
  41. {crackerjack-0.25.0 → crackerjack-0.27.0}/tests/test_interactive_run.py +0 -0
  42. {crackerjack-0.25.0 → crackerjack-0.27.0}/tests/test_main.py +0 -0
  43. {crackerjack-0.25.0 → crackerjack-0.27.0}/tests/test_multiline_functions.py +0 -0
  44. {crackerjack-0.25.0 → crackerjack-0.27.0}/tests/test_py313_advanced.py +0 -0
  45. {crackerjack-0.25.0 → crackerjack-0.27.0}/tests/test_py313_features.py +0 -0
  46. {crackerjack-0.25.0 → crackerjack-0.27.0}/tests/test_pytest_features.py +0 -0
@@ -18,3 +18,14 @@
18
18
  /coverage.json
19
19
  /test-results.xml
20
20
  /.coverage
21
+
22
+ # AI agent output files
23
+ /hooks-analysis.json
24
+ /quality-metrics.json
25
+ /project-structure.json
26
+ /error-context.json
27
+ /ai-agent-summary.json
28
+ /bandit-report.json
29
+
30
+ # Autotyping cache
31
+ .autotyping-cache/
@@ -1,98 +1,112 @@
1
+ # AI-optimized pre-commit hooks for comprehensive analysis and structured output
2
+ # Designed for AI agent workflows with enhanced reporting and metrics
3
+
1
4
  repos:
2
- # File structure and format validators - check structure first
5
+ # Group 1: File Structure & Format Validation (parallel-safe, fast)
3
6
  - repo: https://github.com/pre-commit/pre-commit-hooks
4
7
  rev: v5.0.0
5
8
  hooks:
6
9
  - id: trailing-whitespace
7
10
  name: trailing-whitespace
8
- verbose: true
11
+ stages: [pre-commit]
9
12
  - id: end-of-file-fixer
10
13
  name: end-of-file-fixer
11
- verbose: true
14
+ stages: [pre-commit]
12
15
  - id: check-yaml
13
16
  name: check-yaml
14
- verbose: true
17
+ stages: [pre-commit]
15
18
  - id: check-toml
16
19
  name: check-toml
17
- verbose: true
20
+ stages: [pre-commit]
18
21
  - id: check-added-large-files
19
22
  name: check-added-large-files
20
- verbose: true
23
+ stages: [pre-commit]
21
24
 
25
+ # Group 2: Project Configuration Management
22
26
  - repo: https://github.com/abravalheri/validate-pyproject
23
27
  rev: v0.24.1
24
28
  hooks:
25
29
  - id: validate-pyproject
26
- verbose: true
30
+ stages: [pre-commit]
27
31
 
28
32
  - repo: https://github.com/tox-dev/pyproject-fmt
29
33
  rev: "v2.6.0"
30
34
  hooks:
31
35
  - id: pyproject-fmt
32
36
  args: ["-n"]
33
- verbose: true
37
+ stages: [pre-commit]
34
38
 
35
- # Package management - once structure is valid
36
39
  - repo: https://github.com/astral-sh/uv-pre-commit
37
- rev: 0.7.15
40
+ rev: 0.7.21
38
41
  hooks:
39
42
  - id: uv-lock
40
43
  files: ^pyproject\.toml$
41
- verbose: true
44
+ stages: [pre-commit]
42
45
 
43
- # Security check - early to prevent credential leaks
46
+ # Group 3: Security (early detection, critical)
44
47
  - repo: https://github.com/Yelp/detect-secrets
45
48
  rev: v1.5.0
46
49
  hooks:
47
50
  - id: detect-secrets
48
51
  exclude: 'uv\.lock|pyproject\.toml|tests/.*|docs/.*|.*\.md'
49
- verbose: true
52
+ stages: [pre-commit]
50
53
 
51
- # Code quality tier 1 - quick fixes
54
+ # Group 4: Code Quality & Style (fast formatting)
52
55
  - repo: https://github.com/codespell-project/codespell
53
56
  rev: v2.4.1
54
57
  hooks:
55
58
  - id: codespell
56
- verbose: true
57
59
  additional_dependencies:
58
60
  - tomli
61
+ stages: [pre-commit]
59
62
 
60
63
  - repo: https://github.com/astral-sh/ruff-pre-commit
61
- rev: v0.12.1
64
+ rev: v0.12.3
62
65
  hooks:
63
66
  - id: ruff-check
64
- verbose: true
65
- args: [--output-format=json]
67
+ args: ["--output-format=json", "--fix"]
68
+ stages: [pre-commit]
66
69
  - id: ruff-format
67
- verbose: true
70
+ stages: [pre-commit]
68
71
 
69
- # Code quality tier 2 - analysis
72
+ - repo: https://github.com/executablebooks/mdformat
73
+ rev: 0.7.22
74
+ hooks:
75
+ - id: mdformat
76
+ additional_dependencies:
77
+ - mdformat-ruff
78
+ stages: [pre-commit]
79
+
80
+ # Group 5: Static Analysis (comprehensive, slower)
70
81
  - repo: https://github.com/jendrikseipp/vulture
71
82
  rev: 'v2.14'
72
83
  hooks:
73
84
  - id: vulture
74
- verbose: true
85
+ args: ["--verbose"]
86
+ stages: [pre-commit]
75
87
 
76
88
  - repo: https://github.com/fredrikaverpil/creosote
77
89
  rev: v4.0.3
78
90
  hooks:
79
91
  - id: creosote
80
- verbose: true
92
+ args: ["--verbose"]
93
+ stages: [pre-commit]
81
94
 
82
95
  - repo: https://github.com/rohaquinlop/complexipy-pre-commit
83
96
  rev: v3.0.0
84
97
  hooks:
85
98
  - id: complexipy
86
- args: ["-d", "low", "-j"]
87
- verbose: true
99
+ args: ["-d", "low", "--output", "complexipy.json"]
100
+ stages: [pre-commit]
88
101
 
89
102
  - repo: https://github.com/dosisod/refurb
90
103
  rev: v2.1.0
91
104
  hooks:
92
105
  - id: refurb
93
- verbose: true
106
+ args: ["--quiet"]
107
+ stages: [pre-commit]
94
108
 
95
- # Code quality tier 3 - thorough checks
109
+ # Group 6: Type Checking & Enhancement (most expensive)
96
110
  - repo: local
97
111
  hooks:
98
112
  - id: autotyping
@@ -102,25 +116,38 @@ repos:
102
116
  - --aggressive
103
117
  - --only-without-imports
104
118
  - --guess-common-names
119
+ - --cache-dir=.autotyping-cache
120
+ - --workers=4
121
+ - --max-line-length=88
122
+ - --exclude-name=test_*,conftest
105
123
  - crackerjack
106
124
  types_or: [ python, pyi ]
107
125
  language: python
108
- files: \.py$
109
- verbose: true
126
+ files: ^crackerjack/.*\.py$
127
+ stages: [pre-commit]
110
128
  additional_dependencies:
111
129
  - autotyping>=24.3.0
112
130
  - libcst>=1.1.0
113
131
 
114
132
  - repo: https://github.com/PyCQA/bandit
115
- rev: '1.8.5'
133
+ rev: '1.8.6'
116
134
  hooks:
117
135
  - id: bandit
118
- args: ["-c", "pyproject.toml", "--format", "json"]
119
- verbose: true
136
+ args: ["-c", "pyproject.toml", "-f", "json", "-o", "bandit-report.json", "-r", "-ll"]
137
+ stages: [pre-commit]
120
138
 
121
139
  - repo: https://github.com/RobertCraigie/pyright-python
122
- rev: v1.1.402
140
+ rev: v1.1.403
123
141
  hooks:
124
142
  - id: pyright
125
- verbose: true
126
143
  args: ["--outputjson"]
144
+ stages: [pre-commit]
145
+
146
+ # Group 7: Documentation & Security Enhancement (AI-specific)
147
+ # pydocstyle temporarily disabled - conflicts with code cleaning functionality
148
+ # - repo: https://github.com/PyCQA/pydocstyle
149
+ # rev: 6.3.0
150
+ # hooks:
151
+ # - id: pydocstyle
152
+ # args: ["--config=pyproject.toml"]
153
+ # stages: [pre-commit]
@@ -0,0 +1,69 @@
1
+ # Fast pre-commit hooks for development workflow (target: <5s total)
2
+ repos:
3
+ # Tier 1: Basic structure validation (1.5s)
4
+ - repo: https://github.com/pre-commit/pre-commit-hooks
5
+ rev: v5.0.0
6
+ hooks:
7
+ - id: trailing-whitespace
8
+ name: trailing-whitespace
9
+ stages: [pre-commit]
10
+ - id: end-of-file-fixer
11
+ name: end-of-file-fixer
12
+ stages: [pre-commit]
13
+ - id: check-yaml
14
+ name: check-yaml
15
+ stages: [pre-commit]
16
+ - id: check-toml
17
+ name: check-toml
18
+ stages: [pre-commit]
19
+ - id: check-added-large-files
20
+ name: check-added-large-files
21
+ stages: [pre-commit]
22
+
23
+ - repo: https://github.com/tox-dev/pyproject-fmt
24
+ rev: "v2.6.0"
25
+ hooks:
26
+ - id: pyproject-fmt
27
+ args: ["-n"]
28
+ stages: [pre-commit]
29
+
30
+ # Tier 2: Package management (0.5s)
31
+ - repo: https://github.com/astral-sh/uv-pre-commit
32
+ rev: 0.7.21
33
+ hooks:
34
+ - id: uv-lock
35
+ files: ^pyproject\.toml$
36
+ stages: [pre-commit]
37
+
38
+ # Tier 3: Security (early detection) (1s)
39
+ - repo: https://github.com/Yelp/detect-secrets
40
+ rev: v1.5.0
41
+ hooks:
42
+ - id: detect-secrets
43
+ exclude: 'uv\.lock|pyproject\.toml|tests/.*|docs/.*|.*\.md'
44
+ stages: [pre-commit]
45
+
46
+ # Tier 4: Quick formatting (1.5s)
47
+ - repo: https://github.com/codespell-project/codespell
48
+ rev: v2.4.1
49
+ hooks:
50
+ - id: codespell
51
+ additional_dependencies:
52
+ - tomli
53
+ stages: [pre-commit]
54
+
55
+ - repo: https://github.com/astral-sh/ruff-pre-commit
56
+ rev: v0.12.3
57
+ hooks:
58
+ - id: ruff-check
59
+ stages: [pre-commit]
60
+ - id: ruff-format
61
+ stages: [pre-commit]
62
+
63
+ - repo: https://github.com/executablebooks/mdformat
64
+ rev: 0.7.22
65
+ hooks:
66
+ - id: mdformat
67
+ additional_dependencies:
68
+ - mdformat-ruff
69
+ stages: [pre-commit]
@@ -22,7 +22,7 @@ repos:
22
22
 
23
23
  # Package management - once structure is valid
24
24
  - repo: https://github.com/astral-sh/uv-pre-commit
25
- rev: 0.7.20
25
+ rev: 0.7.21
26
26
  hooks:
27
27
  - id: uv-lock
28
28
  files: ^pyproject\.toml$
@@ -48,29 +48,40 @@ repos:
48
48
  - id: ruff-check
49
49
  - id: ruff-format
50
50
 
51
- # Code quality tier 2 - analysis
51
+ - repo: https://github.com/executablebooks/mdformat
52
+ rev: 0.7.22
53
+ hooks:
54
+ - id: mdformat
55
+ additional_dependencies:
56
+ - mdformat-ruff
57
+
58
+ # Code quality tier 2 - analysis (moved to pre-push for performance)
52
59
  - repo: https://github.com/jendrikseipp/vulture
53
60
  rev: 'v2.14'
54
61
  hooks:
55
62
  - id: vulture
63
+ stages: [pre-push, manual]
56
64
 
57
65
  - repo: https://github.com/fredrikaverpil/creosote
58
66
  rev: v4.0.3
59
67
  hooks:
60
68
  - id: creosote
69
+ stages: [pre-push, manual]
61
70
 
62
71
  - repo: https://github.com/rohaquinlop/complexipy-pre-commit
63
72
  rev: v3.0.0
64
73
  hooks:
65
74
  - id: complexipy
66
75
  args: ["-d", "low"]
76
+ stages: [pre-push, manual]
67
77
 
68
78
  - repo: https://github.com/dosisod/refurb
69
79
  rev: v2.1.0
70
80
  hooks:
71
81
  - id: refurb
82
+ stages: [pre-push, manual]
72
83
 
73
- # Code quality tier 3 - thorough checks
84
+ # Code quality tier 3 - thorough checks (moved to pre-push for performance)
74
85
  - repo: local
75
86
  hooks:
76
87
  - id: autotyping
@@ -80,10 +91,15 @@ repos:
80
91
  - --aggressive
81
92
  - --only-without-imports
82
93
  - --guess-common-names
94
+ - --cache-dir=.autotyping-cache
95
+ - --workers=4
96
+ - --max-line-length=88
97
+ - --exclude-name=test_*,conftest
83
98
  - crackerjack
84
99
  types_or: [ python, pyi ]
85
100
  language: python
86
- files: \.py$
101
+ files: ^crackerjack/.*\.py$
102
+ stages: [pre-push, manual]
87
103
  additional_dependencies:
88
104
  - autotyping>=24.3.0
89
105
  - libcst>=1.1.0
@@ -92,9 +108,19 @@ repos:
92
108
  rev: '1.8.6'
93
109
  hooks:
94
110
  - id: bandit
95
- args: ["-c", "pyproject.toml"]
111
+ args: ["-c", "pyproject.toml", "-r", "-ll"]
112
+ stages: [pre-push, manual]
96
113
 
97
114
  - repo: https://github.com/RobertCraigie/pyright-python
98
115
  rev: v1.1.403
99
116
  hooks:
100
117
  - id: pyright
118
+ stages: [pre-push, manual]
119
+
120
+ # Additional quality and security checks
121
+ - repo: https://github.com/PyCQA/pydocstyle
122
+ rev: 6.3.0
123
+ hooks:
124
+ - id: pydocstyle
125
+ args: ["--config=pyproject.toml"]
126
+ stages: [pre-push, manual]