crackerjack 0.17.3__py3-none-any.whl → 0.18.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
crackerjack/__main__.py CHANGED
@@ -34,6 +34,7 @@ class Options(BaseModel):
34
34
  all: BumpOption | None = None
35
35
  ai_agent: bool = False
36
36
  create_pr: bool = False
37
+ skip_hooks: bool = False
37
38
 
38
39
  @classmethod
39
40
  @field_validator("publish", "bump", mode="before")
@@ -83,6 +84,12 @@ cli_options = {
83
84
  help="Remove docstrings, line comments, and unnecessary whitespace.",
84
85
  ),
85
86
  "test": typer.Option(False, "-t", "--test", help="Run tests."),
87
+ "skip_hooks": typer.Option(
88
+ False,
89
+ "-s",
90
+ "--skip-hooks",
91
+ help="Skip running pre-commit hooks (useful with -t).",
92
+ ),
86
93
  "all": typer.Option(
87
94
  None,
88
95
  "-a",
@@ -118,6 +125,7 @@ def main(
118
125
  bump: BumpOption | None = cli_options["bump"],
119
126
  clean: bool = cli_options["clean"],
120
127
  test: bool = cli_options["test"],
128
+ skip_hooks: bool = cli_options["skip_hooks"],
121
129
  create_pr: bool = cli_options["create_pr"],
122
130
  ai_agent: bool = cli_options["ai_agent"],
123
131
  ) -> None:
@@ -132,6 +140,7 @@ def main(
132
140
  bump=bump,
133
141
  clean=clean,
134
142
  test=test,
143
+ skip_hooks=skip_hooks,
135
144
  all=all,
136
145
  ai_agent=ai_agent,
137
146
  create_pr=create_pr,
@@ -44,6 +44,7 @@ class OptionsProtocol(t.Protocol):
44
44
  all: t.Any | None
45
45
  ai_agent: bool = False
46
46
  create_pr: bool = False
47
+ skip_hooks: bool = False
47
48
 
48
49
 
49
50
  @dataclass
@@ -499,7 +500,7 @@ class Crackerjack:
499
500
  "--no-header", # Reduce output noise
500
501
  "--disable-warnings", # Disable warning capture
501
502
  "--durations=0", # Show slowest tests to identify potential hanging tests
502
- "--timeout=300", # 5-minute timeout for tests
503
+ "--timeout=60", # 1-minute timeout for tests
503
504
  ]
504
505
  )
505
506
  return test
@@ -796,8 +797,14 @@ class Crackerjack:
796
797
  if options.clean:
797
798
  actions_performed.append("clean_project")
798
799
 
799
- self.project_manager.run_pre_commit()
800
- actions_performed.append("run_pre_commit")
800
+ if not options.skip_hooks:
801
+ self.project_manager.run_pre_commit()
802
+ actions_performed.append("run_pre_commit")
803
+ else:
804
+ self.console.print(
805
+ "\n[yellow]Skipping pre-commit hooks as requested[/yellow]\n"
806
+ )
807
+ actions_performed.append("skip_pre_commit")
801
808
 
802
809
  self._run_tests(options)
803
810
  if options.test:
@@ -152,7 +152,7 @@ pythonPlatform = "Darwin"
152
152
 
153
153
  [project]
154
154
  name = "crackerjack"
155
- version = "0.17.2"
155
+ version = "0.17.4"
156
156
  description = "Default template for PDM package"
157
157
  requires-python = ">=3.13"
158
158
  readme = "README.md"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: crackerjack
3
- Version: 0.17.3
3
+ Version: 0.18.0
4
4
  Summary: Default template for PDM package
5
5
  Keywords: black,ruff,mypy,creosote,refurb
6
6
  Author-Email: lesleslie <les@wedgwoodwebworks.com>
@@ -1,7 +1,7 @@
1
- crackerjack-0.17.3.dist-info/METADATA,sha256=dUm7Nrzj0OE9ZKuR5i4kwMBm1VSyM0m92GsJW8zXnss,14872
2
- crackerjack-0.17.3.dist-info/WHEEL,sha256=tSfRZzRHthuv7vxpI4aehrdN9scLjk-dCJkPLzkHxGg,90
3
- crackerjack-0.17.3.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
4
- crackerjack-0.17.3.dist-info/licenses/LICENSE,sha256=fDt371P6_6sCu7RyqiZH_AhT1LdN3sN1zjBtqEhDYCk,1531
1
+ crackerjack-0.18.0.dist-info/METADATA,sha256=jQ8Qzj_9Rsst7T6kNL_XE8gPLU1oQbKGICnjryRlojI,14872
2
+ crackerjack-0.18.0.dist-info/WHEEL,sha256=tSfRZzRHthuv7vxpI4aehrdN9scLjk-dCJkPLzkHxGg,90
3
+ crackerjack-0.18.0.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
4
+ crackerjack-0.18.0.dist-info/licenses/LICENSE,sha256=fDt371P6_6sCu7RyqiZH_AhT1LdN3sN1zjBtqEhDYCk,1531
5
5
  crackerjack/.gitignore,sha256=oho3dNx7a7y36_y9AsalCkssU4in0MMsNAANWdc-h1c,153
6
6
  crackerjack/.libcst.codemod.yaml,sha256=a8DlErRAIPV1nE6QlyXPAzTOgkB24_spl2E9hphuf5s,772
7
7
  crackerjack/.pdm.toml,sha256=dZe44HRcuxxCFESGG8SZIjmc-cGzSoyK3Hs6t4NYA8w,23
@@ -24,7 +24,7 @@ crackerjack/.ruff_cache/0.11.4/9818742842212983150,sha256=QF9j6-3MH_d0pDNotdbF2h
24
24
  crackerjack/.ruff_cache/0.11.6/3557596832929915217,sha256=yR2iXWDkSHVRw2eTiaCE8Eh34JPRUGc8vE3HYEEBk9k,224
25
25
  crackerjack/.ruff_cache/0.11.7/10386934055395314831,sha256=lBNwN5zAgM4OzbkXIOzCczUtfooATrD10htj9ASlFkc,224
26
26
  crackerjack/.ruff_cache/0.11.7/3557596832929915217,sha256=fKlwUbsvT3YIKV6UR-aA_i64lLignWeVfVu-MMmVbU0,207
27
- crackerjack/.ruff_cache/0.11.8/530407680854991027,sha256=0zYmB6Ecipsp6aMmFR5q16aucjbCpGrGzeX3ClX4QLs,224
27
+ crackerjack/.ruff_cache/0.11.8/530407680854991027,sha256=UlycyIbNN1ajp9meoBdVSwj3SLnWD8cQERtByiUpKdg,224
28
28
  crackerjack/.ruff_cache/0.2.0/10047773857155985907,sha256=j9LNa_RQ4Plor7go1uTYgz17cEENKvZQ-dP6b9MX0ik,248
29
29
  crackerjack/.ruff_cache/0.2.1/8522267973936635051,sha256=u_aPBMibtAp_iYvLwR88GMAECMcIgHezxMyuapmU2P4,248
30
30
  crackerjack/.ruff_cache/0.2.2/18053836298936336950,sha256=Xb_ebP0pVuUfSqPEZKlhQ70so_vqkEfMYpuHQ06iR5U,248
@@ -53,7 +53,7 @@ crackerjack/.ruff_cache/0.9.9/12813592349865671909,sha256=tmr8_vhRD2OxsVuMfbJPdT
53
53
  crackerjack/.ruff_cache/0.9.9/8843823720003377982,sha256=e4ymkXfQsUg5e_mtO34xTsaTvs1uA3_fI216Qq9qCAM,136
54
54
  crackerjack/.ruff_cache/CACHEDIR.TAG,sha256=WVMVbX4MVkpCclExbq8m-IcOZIOuIZf5FrYw5Pk-Ma4,43
55
55
  crackerjack/__init__.py,sha256=r9SuEjHUrW99hFWifRk4ofmYPSgf9rblcnzqhdV5bP0,157
56
- crackerjack/__main__.py,sha256=O2BZxkwH8FKIhQJyWEaLAxvFT2pRGSyr4J7nXpDKV9U,4291
57
- crackerjack/crackerjack.py,sha256=QZchgy2XCU4Ax4dpVkJM-NNgaJun7t_7QV0hxjO9zbM,33247
58
- crackerjack/pyproject.toml,sha256=fIFGx2sDmOgDAF8VxcS3wAtbtsCXNu0f9_NybPfhmc0,4199
59
- crackerjack-0.17.3.dist-info/RECORD,,
56
+ crackerjack/__main__.py,sha256=FDAcn9NYoQ7q01YDtdxUgKz3RloItUc-Z8x5kBGcemA,4557
57
+ crackerjack/crackerjack.py,sha256=07yDkbj0ChR5hnqTC6zJw5Bx9YuP9cQad6G3Jbq9OyE,33512
58
+ crackerjack/pyproject.toml,sha256=d_Xtc3IV5KCkUh9fAN5PzuL0DljUpkWFOCx7qeWcvL8,4199
59
+ crackerjack-0.18.0.dist-info/RECORD,,