fast-dev-cli 0.8.2__tar.gz → 0.8.3__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 (28) hide show
  1. {fast_dev_cli-0.8.2 → fast_dev_cli-0.8.3}/PKG-INFO +2 -3
  2. fast_dev_cli-0.8.3/fast_dev_cli/__init__.py +1 -0
  3. fast_dev_cli-0.8.3/fast_dev_cli/__main__.py +3 -0
  4. {fast_dev_cli-0.8.2 → fast_dev_cli-0.8.3}/fast_dev_cli/cli.py +20 -14
  5. {fast_dev_cli-0.8.2 → fast_dev_cli-0.8.3}/pyproject.toml +6 -6
  6. {fast_dev_cli-0.8.2 → fast_dev_cli-0.8.3}/tests/test_bump.py +1 -1
  7. fast_dev_cli-0.8.2/fast_dev_cli/__init__.py +0 -31
  8. fast_dev_cli-0.8.2/fast_dev_cli/__main__.py +0 -3
  9. {fast_dev_cli-0.8.2 → fast_dev_cli-0.8.3}/LICENSE +0 -0
  10. {fast_dev_cli-0.8.2 → fast_dev_cli-0.8.3}/README.md +0 -0
  11. {fast_dev_cli-0.8.2 → fast_dev_cli-0.8.3}/fast_dev_cli/py.typed +0 -0
  12. {fast_dev_cli-0.8.2 → fast_dev_cli-0.8.3}/pdm_build.py +0 -0
  13. {fast_dev_cli-0.8.2 → fast_dev_cli-0.8.3}/scripts/check.sh +0 -0
  14. {fast_dev_cli-0.8.2 → fast_dev_cli-0.8.3}/scripts/format.sh +0 -0
  15. {fast_dev_cli-0.8.2 → fast_dev_cli-0.8.3}/scripts/test.sh +0 -0
  16. {fast_dev_cli-0.8.2 → fast_dev_cli-0.8.3}/tests/__init__.py +0 -0
  17. {fast_dev_cli-0.8.2 → fast_dev_cli-0.8.3}/tests/conftest.py +0 -0
  18. {fast_dev_cli-0.8.2 → fast_dev_cli-0.8.3}/tests/test_fast_test.py +0 -0
  19. {fast_dev_cli-0.8.2 → fast_dev_cli-0.8.3}/tests/test_functions.py +0 -0
  20. {fast_dev_cli-0.8.2 → fast_dev_cli-0.8.3}/tests/test_import.py +0 -0
  21. {fast_dev_cli-0.8.2 → fast_dev_cli-0.8.3}/tests/test_lint.py +0 -0
  22. {fast_dev_cli-0.8.2 → fast_dev_cli-0.8.3}/tests/test_runserver.py +0 -0
  23. {fast_dev_cli-0.8.2 → fast_dev_cli-0.8.3}/tests/test_sync.py +0 -0
  24. {fast_dev_cli-0.8.2 → fast_dev_cli-0.8.3}/tests/test_tag.py +0 -0
  25. {fast_dev_cli-0.8.2 → fast_dev_cli-0.8.3}/tests/test_upgrade.py +0 -0
  26. {fast_dev_cli-0.8.2 → fast_dev_cli-0.8.3}/tests/test_upload.py +0 -0
  27. {fast_dev_cli-0.8.2 → fast_dev_cli-0.8.3}/tests/test_version.py +0 -0
  28. {fast_dev_cli-0.8.2 → fast_dev_cli-0.8.3}/tests/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fast-dev-cli
3
- Version: 0.8.2
3
+ Version: 0.8.3
4
4
  Summary: Python project development tool.
5
5
  Author-Email: Waket Zheng <waketzheng@gmail.com>>
6
6
  Classifier: Development Status :: 4 - Beta
@@ -18,9 +18,8 @@ Classifier: Topic :: Software Development
18
18
  Classifier: Typing :: Typed
19
19
  Classifier: License :: OSI Approved :: MIT License
20
20
  Project-URL: Homepage, https://github.com/waketzheng/fast-dev-cli
21
- Requires-Python: <3.13,>=3.10
21
+ Requires-Python: <4,>=3.10
22
22
  Requires-Dist: typer<0.13,>=0.12.3
23
- Requires-Dist: typing-extensions>=4.8.0
24
23
  Requires-Dist: coverage<8,>=7.5.1
25
24
  Requires-Dist: ruff<0.5,>=0.4.4
26
25
  Requires-Dist: mypy<2,>=1.10.0
@@ -0,0 +1 @@
1
+ __version__ = "0.8.3"
@@ -0,0 +1,3 @@
1
+ from .cli import main
2
+
3
+ main()
@@ -8,28 +8,30 @@ import sys
8
8
  from functools import cached_property
9
9
  from pathlib import Path
10
10
  from subprocess import CompletedProcess
11
- from typing import TYPE_CHECKING, Literal, Optional, Type
11
+ from typing import Literal, Optional, Type
12
12
 
13
13
  import typer
14
14
  from typer import Exit, Option, echo, secho
15
- from typing_extensions import Annotated, Self
15
+ from typer.models import OptionInfo
16
+
17
+ try:
18
+ from . import __version__
19
+ except ImportError: # pragma: no cover
20
+ from fast_dev_cli import __version__
16
21
 
17
22
  if sys.version_info >= (3, 11):
18
23
  from enum import StrEnum
24
+ from typing import Annotated, Self
19
25
  else: # pragma: no cover
20
26
  from enum import Enum
21
27
 
28
+ from typing_extensions import Annotated, Self
29
+
22
30
  class StrEnum(str, Enum):
23
31
  __str__ = str.__str__
24
32
 
25
33
 
26
- if TYPE_CHECKING: # pragma: no cover
27
- from typer.models import OptionInfo
28
-
29
-
30
- __version__ = "0.8.2"
31
-
32
-
34
+ # TODO: use Optional Argument instead
33
35
  def parse_files(args: list[str] | tuple[str, ...]) -> list[str]:
34
36
  return [i for i in args if not i.startswith("-")]
35
37
 
@@ -96,7 +98,7 @@ def get_current_version(
96
98
  return capture_cmd_output(cmd)
97
99
 
98
100
 
99
- def _ensure_bool(value: bool | "OptionInfo") -> bool:
101
+ def _ensure_bool(value: bool | OptionInfo) -> bool:
100
102
  if not isinstance(value, bool):
101
103
  value = getattr(value, "default", False)
102
104
  return value
@@ -202,7 +204,7 @@ class BumpUp(DryRun):
202
204
  @cli.command()
203
205
  def version() -> None:
204
206
  """Show the version of this tool"""
205
- echo(__version__)
207
+ echo(f"Fast Dev Cli version: {__version__}")
206
208
 
207
209
 
208
210
  @cli.command(name="bump")
@@ -666,8 +668,8 @@ def upload(
666
668
 
667
669
 
668
670
  def dev(
669
- port: int | None | "OptionInfo",
670
- host: str | None | "OptionInfo",
671
+ port: int | None | OptionInfo,
672
+ host: str | None | OptionInfo,
671
673
  file: Optional[str] = None,
672
674
  dry=False,
673
675
  ) -> None:
@@ -706,5 +708,9 @@ def runserver(
706
708
  dev(port, host, dry=dry)
707
709
 
708
710
 
709
- if __name__ == "__main__": # pragma: no cover
711
+ def main() -> None:
710
712
  cli()
713
+
714
+
715
+ if __name__ == "__main__": # pragma: no cover
716
+ main()
@@ -12,7 +12,7 @@ authors = [
12
12
  { name = "Waket Zheng", email = "waketzheng@gmail.com>" },
13
13
  ]
14
14
  readme = "README.md"
15
- requires-python = ">=3.10,<3.13"
15
+ requires-python = ">=3.10,<4"
16
16
  classifiers = [
17
17
  "Development Status :: 4 - Beta",
18
18
  "Intended Audience :: Developers",
@@ -31,14 +31,13 @@ classifiers = [
31
31
  ]
32
32
  dependencies = [
33
33
  "typer>=0.12.3,<0.13",
34
- "typing-extensions>=4.8.0",
35
34
  "coverage >=7.5.1,<8",
36
35
  "ruff >=0.4.4,<0.5",
37
36
  "mypy >=1.10.0,<2",
38
37
  "bumpversion >=0.6.0,<0.7",
39
38
  "pytest >=8.2.0,<9",
40
39
  ]
41
- version = "0.8.2"
40
+ version = "0.8.3"
42
41
 
43
42
  [project.urls]
44
43
  Homepage = "https://github.com/waketzheng/fast-dev-cli"
@@ -50,14 +49,14 @@ all = [
50
49
  ]
51
50
 
52
51
  [project.scripts]
53
- fast = "fast_dev_cli:cli.cli"
52
+ fast = "fast_dev_cli:cli.main"
54
53
 
55
54
  [tool.pdm]
56
55
  distribution = true
57
56
 
58
57
  [tool.pdm.version]
59
58
  source = "file"
60
- path = "fast_dev_cli/cli.py"
59
+ path = "fast_dev_cli/__init__.py"
61
60
 
62
61
  [tool.pdm.build]
63
62
  source-includes = [
@@ -84,7 +83,7 @@ all = [
84
83
  ]
85
84
 
86
85
  [tool.waketzheng._internal-slim-build.packages.fast-dev-cli.project.scripts]
87
- fast = "fast_dev_cli:cli.cli"
86
+ fast = "fast_dev_cli:cli.main"
88
87
 
89
88
  [tool.pytest.ini_options]
90
89
  testpaths = [
@@ -112,6 +111,7 @@ exclude_lines = [
112
111
  ]
113
112
  omit = [
114
113
  "tests/*",
114
+ "fast_dev_cli/__main__.py",
115
115
  ]
116
116
 
117
117
  [tool.mypy]
@@ -62,7 +62,7 @@ def test_bump(
62
62
  ):
63
63
  version = get_current_version()
64
64
  patch_without_commit, patch_with_commit, minor_with_commit = _bump_commands(
65
- version, "fast_dev_cli/cli.py"
65
+ version, "fast_dev_cli/__init__.py"
66
66
  )
67
67
  stream = StringIO()
68
68
  with redirect_stdout(stream):
@@ -1,31 +0,0 @@
1
- from .cli import (
2
- __version__,
3
- bump,
4
- bump_version,
5
- check,
6
- lint,
7
- make_style,
8
- only_check,
9
- sync,
10
- tag,
11
- test,
12
- upgrade,
13
- upload,
14
- version,
15
- )
16
-
17
- __all__ = (
18
- "__version__",
19
- "version",
20
- "bump_version",
21
- "bump",
22
- "lint",
23
- "check",
24
- "upload",
25
- "test",
26
- "sync",
27
- "tag",
28
- "upgrade",
29
- "make_style",
30
- "only_check",
31
- )
@@ -1,3 +0,0 @@
1
- from .cli import cli
2
-
3
- cli()
File without changes
File without changes
File without changes