fast-dev-cli 0.25.7__tar.gz → 0.25.8__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fast-dev-cli
3
- Version: 0.25.7
3
+ Version: 0.25.8
4
4
  Summary: Python project development tool.
5
5
  Author-Email: Waket Zheng <waketzheng@gmail.com>>
6
6
  Classifier: Development Status :: 4 - Beta
@@ -0,0 +1 @@
1
+ __version__ = "0.25.8"
@@ -1269,7 +1269,11 @@ class LintCode(DryRun):
1269
1269
  path_args = ["."]
1270
1270
  quoted_paths = _join_shell_args(path_args)
1271
1271
  if path_args != ["."] and all(i.endswith(".html") for i in path_args):
1272
- return f"prettier -w {quoted_paths}"
1272
+ prettier = "prettier"
1273
+ if is_windows() and (abspath := shutil.which(prettier)):
1274
+ # If prettier is installed by `npm i -g`
1275
+ prettier = Path(abspath).name # prettier.CMD
1276
+ return f"{prettier} -w {quoted_paths}"
1273
1277
  ruff_rules = ["I", "B"]
1274
1278
  if ruff_check_sim and not load_bool("FASTDEVCLI_NO_SIM"):
1275
1279
  ruff_rules.append("SIM")
@@ -2225,7 +2229,7 @@ class UvPypi(DryRun):
2225
2229
 
2226
2230
  @cli.command()
2227
2231
  def pypi(
2228
- file: str | None = typer.Argument(default=None),
2232
+ file: Annotated[str | None, typer.Argument()] = None,
2229
2233
  dry: bool = DryOption,
2230
2234
  verbose: bool = False,
2231
2235
  quiet: bool = False,
@@ -2242,7 +2246,7 @@ def pypi(
2242
2246
 
2243
2247
 
2244
2248
  class SuffixParser:
2245
- usually = ("py", "md", "json", "txt", "proto")
2249
+ usually = ("py", "md", "json", "txt", "proto", "toml")
2246
2250
 
2247
2251
  @classmethod
2248
2252
  def fill(cls, files: list[str]) -> list[str]:
@@ -2282,8 +2286,8 @@ def vi(
2282
2286
  dry: Annotated[
2283
2287
  bool, Option(help="Only print, not really run shell command")
2284
2288
  ] = False,
2285
- vertical: bool | None = Option(None, "-O", help="Open vertically"),
2286
- horizon: bool | None = Option(None, "-o", help="Open horizontally"),
2289
+ vertical: Annotated[bool | None, Option(..., "-O", help="Open vertically")] = None,
2290
+ horizon: Annotated[bool | None, Option(..., "-o", help="Open horizontally")] = None,
2287
2291
  guess: Annotated[
2288
2292
  bool, Option(help="Whether guess file suffix if not exist")
2289
2293
  ] = True,
@@ -2308,14 +2312,16 @@ def version_callback(value: bool) -> None:
2308
2312
 
2309
2313
  @cli.callback()
2310
2314
  def common(
2311
- version: bool = Option(
2312
- None,
2313
- "--version",
2314
- "-V",
2315
- callback=version_callback,
2316
- is_eager=True,
2317
- help="Show the version of this tool",
2318
- ),
2315
+ version: Annotated[
2316
+ bool | None,
2317
+ Option(
2318
+ ...,
2319
+ *("--version", "-V"),
2320
+ callback=version_callback,
2321
+ is_eager=True,
2322
+ help="Show the version of this tool",
2323
+ ),
2324
+ ] = None,
2319
2325
  ) -> None: ...
2320
2326
 
2321
2327
 
@@ -29,7 +29,7 @@ dependencies = [
29
29
  "typer>=0.24.0,<1",
30
30
  "tomli >=2.0.1,<3; python_version < '3.11'",
31
31
  ]
32
- version = "0.25.7"
32
+ version = "0.25.8"
33
33
 
34
34
  [project.urls]
35
35
  Homepage = "https://github.com/waketzheng/fast-dev-cli"
@@ -1 +0,0 @@
1
- __version__ = "0.25.7"
File without changes
File without changes