encommon 0.7.4__py3-none-any.whl → 0.7.5__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.
encommon/utils/sample.py CHANGED
@@ -13,17 +13,25 @@ from pathlib import Path
13
13
  from typing import Any
14
14
  from typing import Callable
15
15
  from typing import Optional
16
+ from typing import Union
16
17
 
17
18
  from .. import PROJECT
18
19
  from .. import WORKSPACE
19
20
 
20
21
 
21
22
 
23
+ _REPLACE = Union[
24
+ dict[str, str],
25
+ dict[str, str | Path],
26
+ dict[str, Path]]
27
+
28
+
29
+
22
30
  def prep_sample(
23
31
  content: Any,
24
32
  *,
25
33
  default: Callable[[Any], str] = str,
26
- replace: Optional[dict[str, str | Path]] = None,
34
+ replace: Optional[_REPLACE] = None,
27
35
  ) -> Any:
28
36
  """
29
37
  Return the content after processing using JSON functions.
@@ -76,7 +84,7 @@ def load_sample(
76
84
  update: bool = False,
77
85
  *,
78
86
  default: Callable[[Any], str] = str,
79
- replace: Optional[dict[str, str | Path]] = None,
87
+ replace: Optional[_REPLACE] = None,
80
88
  ) -> Any:
81
89
  """
82
90
  Load the sample file and compare using provided content.
encommon/version.txt CHANGED
@@ -1 +1 @@
1
- 0.7.4
1
+ 0.7.5
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: encommon
3
- Version: 0.7.4
3
+ Version: 0.7.5
4
4
  Summary: Enasis Network Common Library
5
5
  License: MIT
6
6
  Classifier: Programming Language :: Python :: 3
@@ -1,7 +1,7 @@
1
1
  encommon/__init__.py,sha256=VoXUcphq-gcXCraaU47EtXBftF6UVuQPMGr0fuCTt9A,525
2
2
  encommon/conftest.py,sha256=z5BMi6KjNuactDRgbh8J8w81V08Ptf6QK2o_bJANRs4,880
3
3
  encommon/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- encommon/version.txt,sha256=eGrr8_ZzyHxfZD5llT_9mzNihLQbKNVMeu7oBvzdjqQ,6
4
+ encommon/version.txt,sha256=lm8vhpW1wH3j83xoKxQJ2hrIS1x84EonBou0wBesDLg,6
5
5
  encommon/config/__init__.py,sha256=2ic7tK2lOQvqWmmQnMozqxCJcbyQ_sSEHmOUDUFan2U,710
6
6
  encommon/config/common.py,sha256=gaKBgkF7b7UIAhd0ESio0KpG8JfdRpz5BxNgKRptd6A,2041
7
7
  encommon/config/config.py,sha256=BXX2crZPhnI26LpBoXzXO-McRwLRTWnymNBTY14FR80,4743
@@ -48,15 +48,15 @@ encommon/utils/__init__.py,sha256=bBiDsBz8j-fHJ-P-AM4rZKqfiLNv5Q8KID8GfcvpWLA,83
48
48
  encommon/utils/common.py,sha256=UrowELh3PtDzpSS48nGhsAxTS_QUk96-KEJa4MlxiMA,466
49
49
  encommon/utils/match.py,sha256=4L2d2Cvr7vp3odkRCdNQ10OIW8DkEP55_NbQ6bdsReo,2462
50
50
  encommon/utils/paths.py,sha256=4EeaPsVwpv3pzoHeWmiSSGYZEud6hkD27kvbvgSpOPs,3236
51
- encommon/utils/sample.py,sha256=gXz8SZHOtSYKmFF2CzAqB4agy--5Sqc7ePmJKnUXSuA,3136
51
+ encommon/utils/sample.py,sha256=iN7cKOcu8XnNgJ81aEqXpGlB12tPL4grveU6ZxIShEc,3224
52
52
  encommon/utils/stdout.py,sha256=rmesIjpmzpMdV660qZWzVqToPCs4IZNpvPHaTi6i73Y,7360
53
53
  encommon/utils/test/__init__.py,sha256=PjrnBYT0efyvbaGeNx94dm3tP3EVHUHSVs-VGeLEv5g,218
54
54
  encommon/utils/test/test_match.py,sha256=QagKpTFdRo23-Y55fSaJrSMpt5jIebScKbz0h8tivrI,1124
55
55
  encommon/utils/test/test_paths.py,sha256=0ls9gWJ2B487Dr1fHDDFCZPA7gxtv56nFEYHrTkNX-U,1892
56
56
  encommon/utils/test/test_sample.py,sha256=iNV9IxXmA5KJat3jKRiZH3iutHrT6bsibwti60AhICk,1464
57
57
  encommon/utils/test/test_stdout.py,sha256=TA7xQuFoPZUYW2l00e04MGp4P9gHkkVxVflvPlhpQXg,4878
58
- encommon-0.7.4.dist-info/LICENSE,sha256=otnXKCtMjPlbHs0wgZ_BWULrp3g_2dWQJ6icRk9nkgg,1071
59
- encommon-0.7.4.dist-info/METADATA,sha256=rkiclVY-qV7vNMrfCXWknjq2ojZLQ1Gw9JY-Ovj6UME,2671
60
- encommon-0.7.4.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
61
- encommon-0.7.4.dist-info/top_level.txt,sha256=bP8q7-5tLDNm-3XPlqn_bDENfYNug5801H_xfz3BEAM,9
62
- encommon-0.7.4.dist-info/RECORD,,
58
+ encommon-0.7.5.dist-info/LICENSE,sha256=otnXKCtMjPlbHs0wgZ_BWULrp3g_2dWQJ6icRk9nkgg,1071
59
+ encommon-0.7.5.dist-info/METADATA,sha256=j1abQ__Z4hOmnuOBmxnZYhKC-MRhuW2NPt_KkqZz6P4,2671
60
+ encommon-0.7.5.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
61
+ encommon-0.7.5.dist-info/top_level.txt,sha256=bP8q7-5tLDNm-3XPlqn_bDENfYNug5801H_xfz3BEAM,9
62
+ encommon-0.7.5.dist-info/RECORD,,