crackerjack 0.29.0__py3-none-any.whl → 0.30.3__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.

Potentially problematic release.


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

crackerjack/__main__.py CHANGED
@@ -17,6 +17,7 @@ class BumpOption(str, Enum):
17
17
  patch = "patch"
18
18
  minor = "minor"
19
19
  major = "major"
20
+ interactive = "interactive"
20
21
 
21
22
  def __str__(self) -> str:
22
23
  return self.value
@@ -49,12 +50,19 @@ class Options(BaseModel):
49
50
  track_progress: bool = False
50
51
  resume_from: str | None = None
51
52
  progress_file: str | None = None
53
+ experimental_hooks: bool = False
54
+ enable_pyrefly: bool = False
55
+ enable_ty: bool = False
56
+ no_git_tags: bool = False
57
+ skip_version_check: bool = False
52
58
 
53
59
  @classmethod
54
60
  @field_validator("publish", "bump", mode="before")
55
61
  def validate_bump_options(cls, value: str | None) -> BumpOption | None:
56
62
  if value is None:
57
63
  return None
64
+ if value == "":
65
+ return BumpOption.interactive
58
66
  try:
59
67
  return BumpOption(value.lower())
60
68
  except ValueError:
@@ -76,7 +84,10 @@ cli_options = {
76
84
  False, "-n", "--no-config-updates", help="Do not update configuration files."
77
85
  ),
78
86
  "update_precommit": typer.Option(
79
- False, "-u", "--update-precommit", help="Update pre-commit hooks."
87
+ False,
88
+ "-u",
89
+ "--update-precommit",
90
+ help="[DEPRECATED] Pre-commit hooks are now updated automatically weekly.",
80
91
  ),
81
92
  "update_docs": typer.Option(
82
93
  False,
@@ -98,7 +109,7 @@ cli_options = {
98
109
  None,
99
110
  "-p",
100
111
  "--publish",
101
- help="Bump version and publish to PyPI (patch, minor, major).",
112
+ help="Bump version and publish to PyPI (patch, minor, major). Use 'interactive' to be prompted for version selection.",
102
113
  case_sensitive=False,
103
114
  ),
104
115
  "bump": typer.Option(
@@ -188,6 +199,31 @@ cli_options = {
188
199
  "--progress-file",
189
200
  help="Custom path for progress file (default: SESSION-PROGRESS-{timestamp}.md).",
190
201
  ),
202
+ "experimental_hooks": typer.Option(
203
+ False,
204
+ "--experimental-hooks",
205
+ help="Enable experimental pre-commit hooks (includes pyrefly and ty).",
206
+ ),
207
+ "enable_pyrefly": typer.Option(
208
+ False,
209
+ "--enable-pyrefly",
210
+ help="Enable pyrefly experimental type checking (requires experimental hooks mode).",
211
+ ),
212
+ "enable_ty": typer.Option(
213
+ False,
214
+ "--enable-ty",
215
+ help="Enable ty experimental type verification (requires experimental hooks mode).",
216
+ ),
217
+ "no_git_tags": typer.Option(
218
+ False,
219
+ "--no-git-tags",
220
+ help="Skip creating git tags during version bumping (tags are created by default).",
221
+ ),
222
+ "skip_version_check": typer.Option(
223
+ False,
224
+ "--skip-version-check",
225
+ help="Skip version consistency verification between pyproject.toml and git tags.",
226
+ ),
191
227
  }
192
228
 
193
229
 
@@ -221,6 +257,11 @@ def main(
221
257
  track_progress: bool = cli_options["track_progress"],
222
258
  resume_from: str | None = cli_options["resume_from"],
223
259
  progress_file: str | None = cli_options["progress_file"],
260
+ experimental_hooks: bool = cli_options["experimental_hooks"],
261
+ enable_pyrefly: bool = cli_options["enable_pyrefly"],
262
+ enable_ty: bool = cli_options["enable_ty"],
263
+ no_git_tags: bool = cli_options["no_git_tags"],
264
+ skip_version_check: bool = cli_options["skip_version_check"],
224
265
  ) -> None:
225
266
  options = Options(
226
267
  commit=commit,
@@ -249,6 +290,11 @@ def main(
249
290
  track_progress=track_progress,
250
291
  resume_from=resume_from,
251
292
  progress_file=progress_file,
293
+ experimental_hooks=experimental_hooks,
294
+ enable_pyrefly=enable_pyrefly,
295
+ enable_ty=enable_ty,
296
+ no_git_tags=no_git_tags,
297
+ skip_version_check=skip_version_check,
252
298
  )
253
299
  if ai_agent:
254
300
  import os