fast-dev-cli 0.19.5__tar.gz → 0.19.6__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.19.5 → fast_dev_cli-0.19.6}/PKG-INFO +1 -1
- fast_dev_cli-0.19.6/fast_dev_cli/__init__.py +1 -0
- {fast_dev_cli-0.19.5 → fast_dev_cli-0.19.6}/fast_dev_cli/cli.py +19 -5
- {fast_dev_cli-0.19.5 → fast_dev_cli-0.19.6}/pyproject.toml +1 -1
- fast_dev_cli-0.19.6/tests/assets/uv-upload-time.lock +1658 -0
- {fast_dev_cli-0.19.5 → fast_dev_cli-0.19.6}/tests/test_pypi.py +25 -0
- fast_dev_cli-0.19.5/fast_dev_cli/__init__.py +0 -1
- {fast_dev_cli-0.19.5 → fast_dev_cli-0.19.6}/LICENSE +0 -0
- {fast_dev_cli-0.19.5 → fast_dev_cli-0.19.6}/README.md +0 -0
- {fast_dev_cli-0.19.5 → fast_dev_cli-0.19.6}/fast_dev_cli/__main__.py +0 -0
- {fast_dev_cli-0.19.5 → fast_dev_cli-0.19.6}/fast_dev_cli/py.typed +0 -0
- {fast_dev_cli-0.19.5 → fast_dev_cli-0.19.6}/pdm_build.py +0 -0
- {fast_dev_cli-0.19.5 → fast_dev_cli-0.19.6}/scripts/check.py +0 -0
- {fast_dev_cli-0.19.5 → fast_dev_cli-0.19.6}/scripts/deps.py +0 -0
- {fast_dev_cli-0.19.5 → fast_dev_cli-0.19.6}/scripts/format.py +0 -0
- {fast_dev_cli-0.19.5 → fast_dev_cli-0.19.6}/scripts/test.py +0 -0
- {fast_dev_cli-0.19.5 → fast_dev_cli-0.19.6}/tests/__init__.py +0 -0
- {fast_dev_cli-0.19.5 → fast_dev_cli-0.19.6}/tests/assets/uv-tx.lock +0 -0
- {fast_dev_cli-0.19.5 → fast_dev_cli-0.19.6}/tests/assets/uv.lock +0 -0
- {fast_dev_cli-0.19.5 → fast_dev_cli-0.19.6}/tests/conftest.py +0 -0
- {fast_dev_cli-0.19.5 → fast_dev_cli-0.19.6}/tests/test_bump.py +0 -0
- {fast_dev_cli-0.19.5 → fast_dev_cli-0.19.6}/tests/test_deps.py +0 -0
- {fast_dev_cli-0.19.5 → fast_dev_cli-0.19.6}/tests/test_exec.py +0 -0
- {fast_dev_cli-0.19.5 → fast_dev_cli-0.19.6}/tests/test_fast_test.py +0 -0
- {fast_dev_cli-0.19.5 → fast_dev_cli-0.19.6}/tests/test_functions.py +0 -0
- {fast_dev_cli-0.19.5 → fast_dev_cli-0.19.6}/tests/test_help.py +0 -0
- {fast_dev_cli-0.19.5 → fast_dev_cli-0.19.6}/tests/test_lint.py +0 -0
- {fast_dev_cli-0.19.5 → fast_dev_cli-0.19.6}/tests/test_poetry_version_plugin.py +0 -0
- {fast_dev_cli-0.19.5 → fast_dev_cli-0.19.6}/tests/test_runserver.py +0 -0
- {fast_dev_cli-0.19.5 → fast_dev_cli-0.19.6}/tests/test_sync.py +0 -0
- {fast_dev_cli-0.19.5 → fast_dev_cli-0.19.6}/tests/test_tag.py +0 -0
- {fast_dev_cli-0.19.5 → fast_dev_cli-0.19.6}/tests/test_upgrade.py +0 -0
- {fast_dev_cli-0.19.5 → fast_dev_cli-0.19.6}/tests/test_upload.py +0 -0
- {fast_dev_cli-0.19.5 → fast_dev_cli-0.19.6}/tests/test_version.py +0 -0
- {fast_dev_cli-0.19.5 → fast_dev_cli-0.19.6}/tests/utils.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.19.6"
|
|
@@ -170,7 +170,10 @@ class Shell:
|
|
|
170
170
|
|
|
171
171
|
def check_call(self) -> bool:
|
|
172
172
|
self._kw.update(stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
|
173
|
-
|
|
173
|
+
try:
|
|
174
|
+
return self.run() == 0
|
|
175
|
+
except FileNotFoundError:
|
|
176
|
+
return False
|
|
174
177
|
|
|
175
178
|
def capture_output(self, raises: bool = False) -> str:
|
|
176
179
|
self._kw.update(capture_output=True, encoding="utf-8")
|
|
@@ -1624,15 +1627,20 @@ class UvPypi(DryRun):
|
|
|
1624
1627
|
PYPI = "https://pypi.org/simple"
|
|
1625
1628
|
HOST = "https://files.pythonhosted.org"
|
|
1626
1629
|
|
|
1627
|
-
def __init__(
|
|
1630
|
+
def __init__(
|
|
1631
|
+
self, lock_file: Path, dry: bool, verbose: bool, quiet: bool, slim: bool = False
|
|
1632
|
+
) -> None:
|
|
1628
1633
|
super().__init__(dry=dry)
|
|
1629
1634
|
self.lock_file = lock_file
|
|
1630
1635
|
self._verbose = _ensure_bool(verbose)
|
|
1631
1636
|
self._quiet = _ensure_bool(quiet)
|
|
1637
|
+
self._slim = _ensure_bool(slim)
|
|
1632
1638
|
|
|
1633
1639
|
def run(self) -> None:
|
|
1634
1640
|
try:
|
|
1635
|
-
rc = self.update_lock(
|
|
1641
|
+
rc = self.update_lock(
|
|
1642
|
+
self.lock_file, self._verbose, self._quiet, self._slim
|
|
1643
|
+
)
|
|
1636
1644
|
except ValueError as e:
|
|
1637
1645
|
secho(str(e), fg=typer.colors.RED)
|
|
1638
1646
|
raise Exit(1) from e
|
|
@@ -1641,7 +1649,9 @@ class UvPypi(DryRun):
|
|
|
1641
1649
|
raise Exit(rc)
|
|
1642
1650
|
|
|
1643
1651
|
@classmethod
|
|
1644
|
-
def update_lock(
|
|
1652
|
+
def update_lock(
|
|
1653
|
+
cls, p: Path, verbose: bool, quiet: bool, slim: bool = False
|
|
1654
|
+
) -> int:
|
|
1645
1655
|
text = p.read_text("utf-8")
|
|
1646
1656
|
registry_pattern = r'(registry = ")(.*?)"'
|
|
1647
1657
|
replace_registry = functools.partial(
|
|
@@ -1684,6 +1694,9 @@ class UvPypi(DryRun):
|
|
|
1684
1694
|
if verbose:
|
|
1685
1695
|
for current_host in sorted(download_hosts):
|
|
1686
1696
|
echo(f"{current_host} --> {cls.HOST}")
|
|
1697
|
+
if slim:
|
|
1698
|
+
pattern = r', size = \d+, upload-time = ".*?"'
|
|
1699
|
+
text = re.sub(pattern, "", text)
|
|
1687
1700
|
size = p.write_text(text, encoding="utf-8")
|
|
1688
1701
|
if verbose:
|
|
1689
1702
|
echo(f"Updated {p} with {size} bytes.")
|
|
@@ -1698,6 +1711,7 @@ def pypi(
|
|
|
1698
1711
|
dry: bool = DryOption,
|
|
1699
1712
|
verbose: bool = False,
|
|
1700
1713
|
quiet: bool = False,
|
|
1714
|
+
slim: bool = False,
|
|
1701
1715
|
) -> None:
|
|
1702
1716
|
"""Change registry of uv.lock to be pypi.org"""
|
|
1703
1717
|
if not (p := Path(_ensure_str(file) or "uv.lock")).exists() and not (
|
|
@@ -1705,7 +1719,7 @@ def pypi(
|
|
|
1705
1719
|
):
|
|
1706
1720
|
yellow_warn(f"{p.name!r} not found!")
|
|
1707
1721
|
return
|
|
1708
|
-
UvPypi(p, dry, verbose, quiet).run()
|
|
1722
|
+
UvPypi(p, dry, verbose, quiet, slim).run()
|
|
1709
1723
|
|
|
1710
1724
|
|
|
1711
1725
|
def version_callback(value: bool) -> None:
|