fast-dev-cli 0.25.8__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.
- {fast_dev_cli-0.25.8 → fast_dev_cli-0.25.10}/PKG-INFO +1 -1
- fast_dev_cli-0.25.10/fast_dev_cli/__init__.py +1 -0
- {fast_dev_cli-0.25.8 → fast_dev_cli-0.25.10}/fast_dev_cli/cli.py +13 -4
- {fast_dev_cli-0.25.8 → fast_dev_cli-0.25.10}/pyproject.toml +1 -1
- fast_dev_cli-0.25.8/fast_dev_cli/__init__.py +0 -1
- {fast_dev_cli-0.25.8 → fast_dev_cli-0.25.10}/LICENSE +0 -0
- {fast_dev_cli-0.25.8 → fast_dev_cli-0.25.10}/README.md +0 -0
- {fast_dev_cli-0.25.8 → fast_dev_cli-0.25.10}/fast_dev_cli/__main__.py +0 -0
- {fast_dev_cli-0.25.8 → fast_dev_cli-0.25.10}/fast_dev_cli/py.typed +0 -0
|
@@ -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[
|
|
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
|
-
|
|
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}"
|
|
@@ -1658,7 +1662,9 @@ def _should_run_test_script(path: Path = Path("scripts")) -> Path | None:
|
|
|
1658
1662
|
return None
|
|
1659
1663
|
|
|
1660
1664
|
|
|
1661
|
-
def test(
|
|
1665
|
+
def test(
|
|
1666
|
+
dry: bool, ignore_script: bool = False, files: list[Path] | None = None
|
|
1667
|
+
) -> None:
|
|
1662
1668
|
cwd = Path.cwd()
|
|
1663
1669
|
root = Project.get_work_dir(cwd=cwd, allow_cwd=True)
|
|
1664
1670
|
script_dir = root / "scripts"
|
|
@@ -1672,6 +1678,8 @@ def test(dry: bool, ignore_script: bool = False) -> None:
|
|
|
1672
1678
|
cmd = f"cd {_quote_shell_arg(root)} && " + cmd
|
|
1673
1679
|
else:
|
|
1674
1680
|
cmd = 'coverage run -m pytest -s && coverage report --omit="tests/*" -m'
|
|
1681
|
+
if files:
|
|
1682
|
+
cmd = "pytest -s " + " ".join(i.as_posix() for i in files)
|
|
1675
1683
|
if not is_venv() or not check_call("coverage --version"):
|
|
1676
1684
|
sep = " && "
|
|
1677
1685
|
prefix = f"{tool} run " if (tool := Project.get_manage_tool()) else ""
|
|
@@ -1681,11 +1689,12 @@ def test(dry: bool, ignore_script: bool = False) -> None:
|
|
|
1681
1689
|
|
|
1682
1690
|
@cli.command(name="test")
|
|
1683
1691
|
def coverage_test(
|
|
1692
|
+
files: Annotated[list[Path] | None, typer.Argument()] = None,
|
|
1684
1693
|
dry: bool = DryOption,
|
|
1685
1694
|
ignore_script: bool = Option(False, "--ignore-script", "-i"),
|
|
1686
1695
|
) -> None:
|
|
1687
1696
|
"""Run unittest by pytest and report coverage"""
|
|
1688
|
-
return test(dry, ignore_script)
|
|
1697
|
+
return test(dry, ignore_script, files=files)
|
|
1689
1698
|
|
|
1690
1699
|
|
|
1691
1700
|
def _not_a_distribution() -> bool:
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.25.8"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|