fast-dev-cli 0.25.9__tar.gz → 0.25.10__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.9
3
+ Version: 0.25.10
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.10"
@@ -283,7 +283,7 @@ def _get_frontend_version() -> tuple[Path, str] | None:
283
283
  try:
284
284
  from asynctor.jsons import json_loads
285
285
  except ImportError:
286
- from json import loads as json_loads # type:ignore[assignment]
286
+ from json import loads as json_loads # type:ignore[no-redef]
287
287
  content = frontend_version_file.read_bytes()
288
288
  metadata: dict[str, str] = json_loads(content) # type:ignore
289
289
  try:
@@ -1270,7 +1270,11 @@ class LintCode(DryRun):
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
1272
  prettier = "prettier"
1273
- if is_windows() and (abspath := shutil.which(prettier)):
1273
+ abspath = shutil.which(prettier)
1274
+ if abspath is None and (npx := shutil.which("npx")):
1275
+ npx = Path(npx).name.removesuffix(".exe")
1276
+ prettier = f"{npx} prettier"
1277
+ elif is_windows() and abspath:
1274
1278
  # If prettier is installed by `npm i -g`
1275
1279
  prettier = Path(abspath).name # prettier.CMD
1276
1280
  return f"{prettier} -w {quoted_paths}"
@@ -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.9"
32
+ version = "0.25.10"
33
33
 
34
34
  [project.urls]
35
35
  Homepage = "https://github.com/waketzheng/fast-dev-cli"
@@ -1 +0,0 @@
1
- __version__ = "0.25.9"
File without changes
File without changes