click-extended 1.0.0__py3-none-any.whl → 1.0.1__py3-none-any.whl

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 (146) hide show
  1. click_extended/core/__init__.py +10 -0
  2. click_extended/core/decorators/__init__.py +21 -0
  3. click_extended/core/decorators/argument.py +227 -0
  4. click_extended/core/decorators/command.py +93 -0
  5. click_extended/core/decorators/env.py +155 -0
  6. click_extended/core/decorators/group.py +96 -0
  7. click_extended/core/decorators/option.py +347 -0
  8. click_extended/core/decorators/prompt.py +69 -0
  9. click_extended/core/decorators/selection.py +155 -0
  10. click_extended/core/decorators/tag.py +109 -0
  11. click_extended/core/nodes/__init__.py +21 -0
  12. click_extended/core/nodes/_root_node.py +1012 -0
  13. click_extended/core/nodes/argument_node.py +165 -0
  14. click_extended/core/nodes/child_node.py +555 -0
  15. click_extended/core/nodes/child_validation_node.py +100 -0
  16. click_extended/core/nodes/node.py +55 -0
  17. click_extended/core/nodes/option_node.py +205 -0
  18. click_extended/core/nodes/parent_node.py +220 -0
  19. click_extended/core/nodes/validation_node.py +124 -0
  20. click_extended/core/other/__init__.py +7 -0
  21. click_extended/core/other/_click_command.py +60 -0
  22. click_extended/core/other/_click_group.py +246 -0
  23. click_extended/core/other/_tree.py +491 -0
  24. click_extended/core/other/context.py +496 -0
  25. click_extended/decorators/__init__.py +29 -0
  26. click_extended/decorators/check/__init__.py +57 -0
  27. click_extended/decorators/check/conflicts.py +149 -0
  28. click_extended/decorators/check/contains.py +69 -0
  29. click_extended/decorators/check/dependencies.py +115 -0
  30. click_extended/decorators/check/divisible_by.py +48 -0
  31. click_extended/decorators/check/ends_with.py +85 -0
  32. click_extended/decorators/check/exclusive.py +75 -0
  33. click_extended/decorators/check/falsy.py +37 -0
  34. click_extended/decorators/check/is_email.py +43 -0
  35. click_extended/decorators/check/is_hex_color.py +41 -0
  36. click_extended/decorators/check/is_hostname.py +47 -0
  37. click_extended/decorators/check/is_ipv4.py +46 -0
  38. click_extended/decorators/check/is_ipv6.py +46 -0
  39. click_extended/decorators/check/is_json.py +40 -0
  40. click_extended/decorators/check/is_mac_address.py +40 -0
  41. click_extended/decorators/check/is_negative.py +37 -0
  42. click_extended/decorators/check/is_non_zero.py +37 -0
  43. click_extended/decorators/check/is_port.py +39 -0
  44. click_extended/decorators/check/is_positive.py +37 -0
  45. click_extended/decorators/check/is_url.py +75 -0
  46. click_extended/decorators/check/is_uuid.py +40 -0
  47. click_extended/decorators/check/length.py +68 -0
  48. click_extended/decorators/check/not_empty.py +49 -0
  49. click_extended/decorators/check/regex.py +47 -0
  50. click_extended/decorators/check/requires.py +190 -0
  51. click_extended/decorators/check/starts_with.py +87 -0
  52. click_extended/decorators/check/truthy.py +37 -0
  53. click_extended/decorators/compare/__init__.py +15 -0
  54. click_extended/decorators/compare/at_least.py +57 -0
  55. click_extended/decorators/compare/at_most.py +57 -0
  56. click_extended/decorators/compare/between.py +119 -0
  57. click_extended/decorators/compare/greater_than.py +183 -0
  58. click_extended/decorators/compare/less_than.py +183 -0
  59. click_extended/decorators/convert/__init__.py +31 -0
  60. click_extended/decorators/convert/convert_angle.py +94 -0
  61. click_extended/decorators/convert/convert_area.py +123 -0
  62. click_extended/decorators/convert/convert_bits.py +211 -0
  63. click_extended/decorators/convert/convert_distance.py +154 -0
  64. click_extended/decorators/convert/convert_energy.py +155 -0
  65. click_extended/decorators/convert/convert_power.py +128 -0
  66. click_extended/decorators/convert/convert_pressure.py +131 -0
  67. click_extended/decorators/convert/convert_speed.py +122 -0
  68. click_extended/decorators/convert/convert_temperature.py +89 -0
  69. click_extended/decorators/convert/convert_time.py +108 -0
  70. click_extended/decorators/convert/convert_volume.py +218 -0
  71. click_extended/decorators/convert/convert_weight.py +158 -0
  72. click_extended/decorators/load/__init__.py +13 -0
  73. click_extended/decorators/load/load_csv.py +117 -0
  74. click_extended/decorators/load/load_json.py +61 -0
  75. click_extended/decorators/load/load_toml.py +47 -0
  76. click_extended/decorators/load/load_yaml.py +72 -0
  77. click_extended/decorators/math/__init__.py +37 -0
  78. click_extended/decorators/math/absolute.py +35 -0
  79. click_extended/decorators/math/add.py +48 -0
  80. click_extended/decorators/math/ceil.py +36 -0
  81. click_extended/decorators/math/clamp.py +51 -0
  82. click_extended/decorators/math/divide.py +42 -0
  83. click_extended/decorators/math/floor.py +36 -0
  84. click_extended/decorators/math/maximum.py +39 -0
  85. click_extended/decorators/math/minimum.py +39 -0
  86. click_extended/decorators/math/modulo.py +39 -0
  87. click_extended/decorators/math/multiply.py +51 -0
  88. click_extended/decorators/math/normalize.py +76 -0
  89. click_extended/decorators/math/power.py +39 -0
  90. click_extended/decorators/math/rounded.py +39 -0
  91. click_extended/decorators/math/sqrt.py +39 -0
  92. click_extended/decorators/math/subtract.py +39 -0
  93. click_extended/decorators/math/to_percent.py +63 -0
  94. click_extended/decorators/misc/__init__.py +17 -0
  95. click_extended/decorators/misc/choice.py +139 -0
  96. click_extended/decorators/misc/confirm_if.py +147 -0
  97. click_extended/decorators/misc/default.py +95 -0
  98. click_extended/decorators/misc/deprecated.py +131 -0
  99. click_extended/decorators/misc/experimental.py +79 -0
  100. click_extended/decorators/misc/now.py +42 -0
  101. click_extended/decorators/random/__init__.py +21 -0
  102. click_extended/decorators/random/random_bool.py +49 -0
  103. click_extended/decorators/random/random_choice.py +63 -0
  104. click_extended/decorators/random/random_datetime.py +140 -0
  105. click_extended/decorators/random/random_float.py +62 -0
  106. click_extended/decorators/random/random_integer.py +56 -0
  107. click_extended/decorators/random/random_prime.py +196 -0
  108. click_extended/decorators/random/random_string.py +77 -0
  109. click_extended/decorators/random/random_uuid.py +119 -0
  110. click_extended/decorators/transform/__init__.py +71 -0
  111. click_extended/decorators/transform/add_prefix.py +58 -0
  112. click_extended/decorators/transform/add_suffix.py +58 -0
  113. click_extended/decorators/transform/apply.py +35 -0
  114. click_extended/decorators/transform/basename.py +44 -0
  115. click_extended/decorators/transform/dirname.py +44 -0
  116. click_extended/decorators/transform/expand_vars.py +36 -0
  117. click_extended/decorators/transform/remove_prefix.py +57 -0
  118. click_extended/decorators/transform/remove_suffix.py +57 -0
  119. click_extended/decorators/transform/replace.py +46 -0
  120. click_extended/decorators/transform/slugify.py +45 -0
  121. click_extended/decorators/transform/split.py +43 -0
  122. click_extended/decorators/transform/strip.py +148 -0
  123. click_extended/decorators/transform/to_case.py +216 -0
  124. click_extended/decorators/transform/to_date.py +75 -0
  125. click_extended/decorators/transform/to_datetime.py +83 -0
  126. click_extended/decorators/transform/to_path.py +274 -0
  127. click_extended/decorators/transform/to_time.py +77 -0
  128. click_extended/decorators/transform/to_timestamp.py +114 -0
  129. click_extended/decorators/transform/truncate.py +47 -0
  130. click_extended/utils/__init__.py +13 -0
  131. click_extended/utils/casing.py +169 -0
  132. click_extended/utils/checks.py +48 -0
  133. click_extended/utils/dispatch.py +1016 -0
  134. click_extended/utils/format.py +101 -0
  135. click_extended/utils/humanize.py +209 -0
  136. click_extended/utils/naming.py +238 -0
  137. click_extended/utils/process.py +294 -0
  138. click_extended/utils/selection.py +267 -0
  139. click_extended/utils/time.py +46 -0
  140. {click_extended-1.0.0.dist-info → click_extended-1.0.1.dist-info}/METADATA +2 -1
  141. click_extended-1.0.1.dist-info/RECORD +149 -0
  142. click_extended-1.0.0.dist-info/RECORD +0 -10
  143. {click_extended-1.0.0.dist-info → click_extended-1.0.1.dist-info}/WHEEL +0 -0
  144. {click_extended-1.0.0.dist-info → click_extended-1.0.1.dist-info}/licenses/AUTHORS.md +0 -0
  145. {click_extended-1.0.0.dist-info → click_extended-1.0.1.dist-info}/licenses/LICENSE +0 -0
  146. {click_extended-1.0.0.dist-info → click_extended-1.0.1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,42 @@
1
+ """Divide the input by a value."""
2
+
3
+ from typing import Any
4
+
5
+ from click_extended.core.nodes.child_node import ChildNode
6
+ from click_extended.core.other.context import Context
7
+ from click_extended.types import Decorator
8
+
9
+
10
+ class Divide(ChildNode):
11
+ """Divide the input by a value."""
12
+
13
+ def handle_numeric(
14
+ self,
15
+ value: int | float,
16
+ context: Context,
17
+ *args: Any,
18
+ **kwargs: Any,
19
+ ) -> Any:
20
+ n = kwargs["n"]
21
+ if n == 0:
22
+ raise ZeroDivisionError("division by zero")
23
+ return value / n
24
+
25
+
26
+ def divide(n: int | float) -> Decorator:
27
+ """
28
+ Divide the input by a value.
29
+
30
+ Type: `ChildNode`
31
+
32
+ Supports: `int`, `float`
33
+
34
+ Args:
35
+ n (int | float):
36
+ The value to divide by.
37
+
38
+ Returns:
39
+ Decorator:
40
+ The decorated function.
41
+ """
42
+ return Divide.as_decorator(n=n)
@@ -0,0 +1,36 @@
1
+ """Calculate the floor of the input."""
2
+
3
+ import math
4
+ from typing import Any
5
+
6
+ from click_extended.core.nodes.child_node import ChildNode
7
+ from click_extended.core.other.context import Context
8
+ from click_extended.types import Decorator
9
+
10
+
11
+ class Floor(ChildNode):
12
+ """Calculate the floor of the input."""
13
+
14
+ def handle_numeric(
15
+ self,
16
+ value: int | float,
17
+ context: Context,
18
+ *args: Any,
19
+ **kwargs: Any,
20
+ ) -> Any:
21
+ return math.floor(value)
22
+
23
+
24
+ def floor() -> Decorator:
25
+ """
26
+ Calculate the floor of the input.
27
+
28
+ Type: `ChildNode`
29
+
30
+ Supports: `int`, `float`
31
+
32
+ Returns:
33
+ Decorator:
34
+ The decorated function.
35
+ """
36
+ return Floor.as_decorator()
@@ -0,0 +1,39 @@
1
+ """Ensure the value is at most a maximum."""
2
+
3
+ from typing import Any, Union
4
+
5
+ from click_extended.core.nodes.child_node import ChildNode
6
+ from click_extended.core.other.context import Context
7
+ from click_extended.types import Decorator
8
+
9
+
10
+ class Maximum(ChildNode):
11
+ """Ensure the value is at most a maximum."""
12
+
13
+ def handle_numeric(
14
+ self,
15
+ value: int | float,
16
+ context: Context,
17
+ *args: Any,
18
+ **kwargs: Any,
19
+ ) -> Any:
20
+ return min(value, kwargs["max_val"])
21
+
22
+
23
+ def maximum(max_val: Union[int, float]) -> Decorator:
24
+ """
25
+ Ensure the value is at most a maximum.
26
+
27
+ Type: `ChildNode`
28
+
29
+ Supports: `int`, `float`
30
+
31
+ Args:
32
+ max_val (int | float):
33
+ The maximum value.
34
+
35
+ Returns:
36
+ Decorator:
37
+ The decorated function.
38
+ """
39
+ return Maximum.as_decorator(max_val=max_val)
@@ -0,0 +1,39 @@
1
+ """Ensure the value is at least a minimum."""
2
+
3
+ from typing import Any
4
+
5
+ from click_extended.core.nodes.child_node import ChildNode
6
+ from click_extended.core.other.context import Context
7
+ from click_extended.types import Decorator
8
+
9
+
10
+ class Minimum(ChildNode):
11
+ """Ensure the value is at least a minimum."""
12
+
13
+ def handle_numeric(
14
+ self,
15
+ value: int | float,
16
+ context: Context,
17
+ *args: Any,
18
+ **kwargs: Any,
19
+ ) -> Any:
20
+ return max(value, kwargs["min_val"])
21
+
22
+
23
+ def minimum(min_val: int | float) -> Decorator:
24
+ """
25
+ Ensure the value is at least a minimum.
26
+
27
+ Type: `ChildNode`
28
+
29
+ Supports: `int`, `float`
30
+
31
+ Args:
32
+ min_val (int | float):
33
+ The minimum value.
34
+
35
+ Returns:
36
+ Decorator:
37
+ The decorated function.
38
+ """
39
+ return Minimum.as_decorator(min_val=min_val)
@@ -0,0 +1,39 @@
1
+ """Calculate the modulo of the input."""
2
+
3
+ from typing import Any
4
+
5
+ from click_extended.core.nodes.child_node import ChildNode
6
+ from click_extended.core.other.context import Context
7
+ from click_extended.types import Decorator
8
+
9
+
10
+ class Modulo(ChildNode):
11
+ """Calculate the modulo of the input."""
12
+
13
+ def handle_numeric(
14
+ self,
15
+ value: int | float,
16
+ context: Context,
17
+ *args: Any,
18
+ **kwargs: Any,
19
+ ) -> Any:
20
+ return value % kwargs["n"]
21
+
22
+
23
+ def modulo(n: int | float) -> Decorator:
24
+ """
25
+ Calculate the modulo of the input.
26
+
27
+ Type: `ChildNode`
28
+
29
+ Supports: `int`, `float`
30
+
31
+ Args:
32
+ n (int | float):
33
+ The divisor.
34
+
35
+ Returns:
36
+ Decorator:
37
+ The decorated function.
38
+ """
39
+ return Modulo.as_decorator(n=n)
@@ -0,0 +1,51 @@
1
+ """Multiply the input by a value."""
2
+
3
+ from typing import Any
4
+
5
+ from click_extended.core.nodes.child_node import ChildNode
6
+ from click_extended.core.other.context import Context
7
+ from click_extended.types import Decorator
8
+
9
+
10
+ class Multiply(ChildNode):
11
+ """Multiply the input by a value."""
12
+
13
+ def handle_numeric(
14
+ self,
15
+ value: int | float,
16
+ context: Context,
17
+ *args: Any,
18
+ **kwargs: Any,
19
+ ) -> Any:
20
+ return value * kwargs["n"]
21
+
22
+ def handle_str(
23
+ self,
24
+ value: str,
25
+ context: Context,
26
+ *args: Any,
27
+ **kwargs: Any,
28
+ ) -> Any:
29
+ n = kwargs["n"]
30
+ if not isinstance(n, int):
31
+ raise TypeError(f"Cannot multiply string by non-int type {type(n)}")
32
+ return value * n
33
+
34
+
35
+ def multiply(n: int | float) -> Decorator:
36
+ """
37
+ Multiply the input by a value.
38
+
39
+ Type: `ChildNode`
40
+
41
+ Supports: `int`, `float`, `str`
42
+
43
+ Args:
44
+ n (int | float):
45
+ The value to multiply by.
46
+
47
+ Returns:
48
+ Decorator:
49
+ The decorated function.
50
+ """
51
+ return Multiply.as_decorator(n=n)
@@ -0,0 +1,76 @@
1
+ """Normalize a value within a range."""
2
+
3
+ from decimal import Decimal, getcontext
4
+ from typing import Any
5
+
6
+ from click_extended.core.nodes.child_node import ChildNode
7
+ from click_extended.core.other.context import Context
8
+ from click_extended.types import Decorator
9
+
10
+ getcontext().prec = 35
11
+
12
+
13
+ class Normalize(ChildNode):
14
+ """Normalize a value within a range."""
15
+
16
+ def handle_numeric(
17
+ self,
18
+ value: int | float,
19
+ context: Context,
20
+ *args: Any,
21
+ **kwargs: Any,
22
+ ) -> float:
23
+ min_val = kwargs["min_val"]
24
+ max_val = kwargs["max_val"]
25
+ new_min = kwargs.get("new_min")
26
+ new_max = kwargs.get("new_max")
27
+
28
+ val = Decimal(str(value))
29
+ min_v = Decimal(str(min_val))
30
+ max_v = Decimal(str(max_val))
31
+
32
+ if new_min is None or new_max is None:
33
+ # Normalize to 0-1
34
+ result = (val - min_v) / (max_v - min_v)
35
+ else:
36
+ # Normalize to new range
37
+ n_min = Decimal(str(new_min))
38
+ n_max = Decimal(str(new_max))
39
+ result = n_min + (val - min_v) * (n_max - n_min) / (max_v - min_v)
40
+
41
+ return float(result)
42
+
43
+
44
+ def normalize(
45
+ min_val: float,
46
+ max_val: float,
47
+ new_min: float | None = None,
48
+ new_max: float | None = None,
49
+ ) -> Decorator:
50
+ """
51
+ Normalize a value within a range.
52
+
53
+ Type: `ChildNode`
54
+
55
+ Supports: `int`, `float`
56
+
57
+ Args:
58
+ min_val (float):
59
+ The minimum value of the input range.
60
+ max_val (float):
61
+ The maximum value of the input range.
62
+ new_min (float, optional):
63
+ The minimum value of the output range.
64
+ new_max (float, optional):
65
+ The maximum value of the output range.
66
+
67
+ Returns:
68
+ Decorator:
69
+ The decorated function.
70
+ """
71
+ return Normalize.as_decorator(
72
+ min_val=min_val,
73
+ max_val=max_val,
74
+ new_min=new_min,
75
+ new_max=new_max,
76
+ )
@@ -0,0 +1,39 @@
1
+ """Raise the input to a power."""
2
+
3
+ from typing import Any
4
+
5
+ from click_extended.core.nodes.child_node import ChildNode
6
+ from click_extended.core.other.context import Context
7
+ from click_extended.types import Decorator
8
+
9
+
10
+ class Power(ChildNode):
11
+ """Raise the input to a power."""
12
+
13
+ def handle_numeric(
14
+ self,
15
+ value: int | float,
16
+ context: Context,
17
+ *args: Any,
18
+ **kwargs: Any,
19
+ ) -> Any:
20
+ return value ** kwargs["n"]
21
+
22
+
23
+ def power(n: int | float) -> Decorator:
24
+ """
25
+ Raise the input to a power.
26
+
27
+ Type: `ChildNode`
28
+
29
+ Supports: `int`, `float`
30
+
31
+ Args:
32
+ n (int | float):
33
+ The exponent.
34
+
35
+ Returns:
36
+ Decorator:
37
+ The decorated function.
38
+ """
39
+ return Power.as_decorator(n=n)
@@ -0,0 +1,39 @@
1
+ """Round the input to a given precision."""
2
+
3
+ from typing import Any
4
+
5
+ from click_extended.core.nodes.child_node import ChildNode
6
+ from click_extended.core.other.context import Context
7
+ from click_extended.types import Decorator
8
+
9
+
10
+ class Rounded(ChildNode):
11
+ """Round the input to a given precision."""
12
+
13
+ def handle_numeric(
14
+ self,
15
+ value: int | float,
16
+ context: Context,
17
+ *args: Any,
18
+ **kwargs: Any,
19
+ ) -> Any:
20
+ return round(value, kwargs["digits"])
21
+
22
+
23
+ def rounded(digits: int = 0) -> Decorator:
24
+ """
25
+ Round the input to a given precision.
26
+
27
+ Type: `ChildNode`
28
+
29
+ Supports: `int`, `float`
30
+
31
+ Args:
32
+ digits (int):
33
+ The number of digits to round to. Defaults to `0`.
34
+
35
+ Returns:
36
+ Decorator:
37
+ The decorated function.
38
+ """
39
+ return Rounded.as_decorator(digits=digits)
@@ -0,0 +1,39 @@
1
+ """Calculate the square root of the input."""
2
+
3
+ import cmath
4
+ import math
5
+ from typing import Any
6
+
7
+ from click_extended.core.nodes.child_node import ChildNode
8
+ from click_extended.core.other.context import Context
9
+ from click_extended.types import Decorator
10
+
11
+
12
+ class Sqrt(ChildNode):
13
+ """Calculate the square root of the input."""
14
+
15
+ def handle_numeric(
16
+ self,
17
+ value: int | float,
18
+ context: Context,
19
+ *args: Any,
20
+ **kwargs: Any,
21
+ ) -> Any:
22
+ if value < 0:
23
+ return cmath.sqrt(value)
24
+ return math.sqrt(value)
25
+
26
+
27
+ def sqrt() -> Decorator:
28
+ """
29
+ Calculate the square root of the input, supports complex numbers.
30
+
31
+ Type: `ChildNode`
32
+
33
+ Supports: `int`, `float`
34
+
35
+ Returns:
36
+ Decorator:
37
+ The decorated function.
38
+ """
39
+ return Sqrt.as_decorator()
@@ -0,0 +1,39 @@
1
+ """Subtract a value from the input."""
2
+
3
+ from typing import Any
4
+
5
+ from click_extended.core.nodes.child_node import ChildNode
6
+ from click_extended.core.other.context import Context
7
+ from click_extended.types import Decorator
8
+
9
+
10
+ class Subtract(ChildNode):
11
+ """Subtract a value from the input."""
12
+
13
+ def handle_numeric(
14
+ self,
15
+ value: int | float,
16
+ context: Context,
17
+ *args: Any,
18
+ **kwargs: Any,
19
+ ) -> Any:
20
+ return value - kwargs["n"]
21
+
22
+
23
+ def subtract(n: int | float) -> Decorator:
24
+ """
25
+ Subtract a value from the input.
26
+
27
+ Type: `ChildNode`
28
+
29
+ Supports: `int`, `float`
30
+
31
+ Args:
32
+ n (int | float):
33
+ The value to subtract.
34
+
35
+ Returns:
36
+ Decorator:
37
+ The decorated function.
38
+ """
39
+ return Subtract.as_decorator(n=n)
@@ -0,0 +1,63 @@
1
+ """Convert a value to a percentage decimal."""
2
+
3
+ from decimal import Decimal, getcontext
4
+ from typing import Any
5
+
6
+ from click_extended.core.nodes.child_node import ChildNode
7
+ from click_extended.core.other.context import Context
8
+ from click_extended.types import Decorator
9
+
10
+ getcontext().prec = 35
11
+
12
+
13
+ class ToPercent(ChildNode):
14
+ """Convert a value to a percentage decimal."""
15
+
16
+ def handle_str(
17
+ self,
18
+ value: str,
19
+ context: Context,
20
+ *args: Any,
21
+ **kwargs: Any,
22
+ ) -> float:
23
+ s_val = value.strip()
24
+ if s_val.endswith("%"):
25
+ s_val = s_val[:-1]
26
+
27
+ try:
28
+ val = Decimal(s_val)
29
+ except Exception as e:
30
+ raise ValueError(f"Cannot convert '{value}' to percent.") from e
31
+
32
+ return float(val / 100)
33
+
34
+ def handle_numeric(
35
+ self,
36
+ value: int | float,
37
+ context: Context,
38
+ *args: Any,
39
+ **kwargs: Any,
40
+ ) -> float:
41
+ val = Decimal(str(value))
42
+ return float(val / 100)
43
+
44
+
45
+ def to_percent() -> Decorator:
46
+ """
47
+ Convert a value to a percentage decimal.
48
+
49
+ Type: `ChildNode`
50
+
51
+ Supports: `str`, `int`, `float`
52
+
53
+ Examples:
54
+ - "50%" -> 0.5
55
+ - "50" -> 0.5
56
+ - 50 -> 0.5
57
+ - 0.5 -> 0.005
58
+
59
+ Returns:
60
+ Decorator:
61
+ The decorated function.
62
+ """
63
+ return ToPercent.as_decorator()
@@ -0,0 +1,17 @@
1
+ """Initialization file for the `click_extended.decorators.misc` module."""
2
+
3
+ from click_extended.decorators.misc.choice import choice
4
+ from click_extended.decorators.misc.confirm_if import confirm_if
5
+ from click_extended.decorators.misc.default import default
6
+ from click_extended.decorators.misc.deprecated import deprecated
7
+ from click_extended.decorators.misc.experimental import experimental
8
+ from click_extended.decorators.misc.now import now
9
+
10
+ __all__ = [
11
+ "choice",
12
+ "confirm_if",
13
+ "default",
14
+ "deprecated",
15
+ "experimental",
16
+ "now",
17
+ ]