fast-dev-cli 0.18.0__tar.gz → 0.18.1__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.
Files changed (34) hide show
  1. {fast_dev_cli-0.18.0 → fast_dev_cli-0.18.1}/PKG-INFO +1 -1
  2. fast_dev_cli-0.18.1/fast_dev_cli/__init__.py +1 -0
  3. {fast_dev_cli-0.18.0 → fast_dev_cli-0.18.1}/fast_dev_cli/cli.py +2 -1
  4. {fast_dev_cli-0.18.0 → fast_dev_cli-0.18.1}/pyproject.toml +1 -1
  5. {fast_dev_cli-0.18.0 → fast_dev_cli-0.18.1}/tests/test_pypi.py +14 -1
  6. fast_dev_cli-0.18.0/fast_dev_cli/__init__.py +0 -1
  7. {fast_dev_cli-0.18.0 → fast_dev_cli-0.18.1}/LICENSE +0 -0
  8. {fast_dev_cli-0.18.0 → fast_dev_cli-0.18.1}/README.md +0 -0
  9. {fast_dev_cli-0.18.0 → fast_dev_cli-0.18.1}/fast_dev_cli/__main__.py +0 -0
  10. {fast_dev_cli-0.18.0 → fast_dev_cli-0.18.1}/fast_dev_cli/py.typed +0 -0
  11. {fast_dev_cli-0.18.0 → fast_dev_cli-0.18.1}/pdm_build.py +0 -0
  12. {fast_dev_cli-0.18.0 → fast_dev_cli-0.18.1}/scripts/check.py +0 -0
  13. {fast_dev_cli-0.18.0 → fast_dev_cli-0.18.1}/scripts/deps.py +0 -0
  14. {fast_dev_cli-0.18.0 → fast_dev_cli-0.18.1}/scripts/format.py +0 -0
  15. {fast_dev_cli-0.18.0 → fast_dev_cli-0.18.1}/scripts/test.py +0 -0
  16. {fast_dev_cli-0.18.0 → fast_dev_cli-0.18.1}/tests/__init__.py +0 -0
  17. {fast_dev_cli-0.18.0 → fast_dev_cli-0.18.1}/tests/assets/uv-tx.lock +0 -0
  18. {fast_dev_cli-0.18.0 → fast_dev_cli-0.18.1}/tests/assets/uv.lock +0 -0
  19. {fast_dev_cli-0.18.0 → fast_dev_cli-0.18.1}/tests/conftest.py +0 -0
  20. {fast_dev_cli-0.18.0 → fast_dev_cli-0.18.1}/tests/test_bump.py +0 -0
  21. {fast_dev_cli-0.18.0 → fast_dev_cli-0.18.1}/tests/test_deps.py +0 -0
  22. {fast_dev_cli-0.18.0 → fast_dev_cli-0.18.1}/tests/test_exec.py +0 -0
  23. {fast_dev_cli-0.18.0 → fast_dev_cli-0.18.1}/tests/test_fast_test.py +0 -0
  24. {fast_dev_cli-0.18.0 → fast_dev_cli-0.18.1}/tests/test_functions.py +0 -0
  25. {fast_dev_cli-0.18.0 → fast_dev_cli-0.18.1}/tests/test_help.py +0 -0
  26. {fast_dev_cli-0.18.0 → fast_dev_cli-0.18.1}/tests/test_lint.py +0 -0
  27. {fast_dev_cli-0.18.0 → fast_dev_cli-0.18.1}/tests/test_poetry_version_plugin.py +0 -0
  28. {fast_dev_cli-0.18.0 → fast_dev_cli-0.18.1}/tests/test_runserver.py +0 -0
  29. {fast_dev_cli-0.18.0 → fast_dev_cli-0.18.1}/tests/test_sync.py +0 -0
  30. {fast_dev_cli-0.18.0 → fast_dev_cli-0.18.1}/tests/test_tag.py +0 -0
  31. {fast_dev_cli-0.18.0 → fast_dev_cli-0.18.1}/tests/test_upgrade.py +0 -0
  32. {fast_dev_cli-0.18.0 → fast_dev_cli-0.18.1}/tests/test_upload.py +0 -0
  33. {fast_dev_cli-0.18.0 → fast_dev_cli-0.18.1}/tests/test_version.py +0 -0
  34. {fast_dev_cli-0.18.0 → fast_dev_cli-0.18.1}/tests/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fast-dev-cli
3
- Version: 0.18.0
3
+ Version: 0.18.1
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.18.1"
@@ -1463,12 +1463,13 @@ class UvPypi(DryRun):
1463
1463
 
1464
1464
  @cli.command()
1465
1465
  def pypi(
1466
+ file: Optional[str] = typer.Argument(default=None),
1466
1467
  dry: bool = DryOption,
1467
1468
  verbose: bool = False,
1468
1469
  quiet: bool = False,
1469
1470
  ) -> None:
1470
1471
  """Change registry of uv.lock to be pypi.org"""
1471
- if not (p := Path("uv.lock")).exists() and not (
1472
+ if not (p := Path(file or "uv.lock")).exists() and not (
1472
1473
  (p := Project.get_work_dir() / p.name).exists()
1473
1474
  ):
1474
1475
  yellow_warn(f"{p.name!r} not found!")
@@ -42,7 +42,7 @@ dependencies = [
42
42
  "bumpversion2 >=1.4.3",
43
43
  "pytest >=8.2.0",
44
44
  ]
45
- version = "0.18.0"
45
+ version = "0.18.1"
46
46
 
47
47
  [project.urls]
48
48
  Homepage = "https://github.com/waketzheng/fast-dev-cli"
@@ -23,7 +23,7 @@ def test_pypi(tmp_work_dir, capsys):
23
23
  assert new_text != text
24
24
  assert "tsinghua" in text and "pypi.org" not in text
25
25
  assert "tsinghua" not in new_text and "pypi.org" in new_text
26
- shutil.copy(uv_qh, ".")
26
+ lock_file.write_text(text, encoding="utf-8")
27
27
  pypi(quiet=True)
28
28
  assert new_text == lock_file.read_text("utf-8")
29
29
  pypi()
@@ -37,7 +37,20 @@ def test_pypi(tmp_work_dir, capsys):
37
37
  assert new_text != text
38
38
  assert "tencent" in text and "pypi.org" not in text
39
39
  assert "tencent" not in new_text and "pypi.org" in new_text
40
+ lock_file.write_text(text, encoding="utf-8")
40
41
  pypi(quiet=True)
41
42
  assert new_text == lock_file.read_text("utf-8")
42
43
  pypi()
43
44
  assert new_text == lock_file.read_text("utf-8")
45
+
46
+ lock_file = Path(uv_tx.name)
47
+ shutil.copy(uv_tx, ".")
48
+ text = lock_file.read_text("utf-8")
49
+ with pytest.raises(Exit):
50
+ pypi(uv_tx.name)
51
+ new_text = lock_file.read_text("utf-8")
52
+ shutil.copy(uv_tx, ".")
53
+ pypi(uv_tx.name, quiet=True)
54
+ assert new_text == lock_file.read_text("utf-8")
55
+ pypi(uv_tx.name)
56
+ assert new_text == lock_file.read_text("utf-8")
@@ -1 +0,0 @@
1
- __version__ = "0.18.0"
File without changes
File without changes