internal 1.0.57__py3-none-any.whl → 1.0.58__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.

Potentially problematic release.


This version of internal might be problematic. Click here for more details.

internal/model/operate.py CHANGED
@@ -36,11 +36,17 @@ class Operate(BaseModel):
36
36
  diff[2] = list(diff[2])
37
37
 
38
38
  if diff[0] == 'change':
39
- diff_result['change'][diff[1]] = {'orig': diff[2][0], 'new': diff[2][1]}
39
+ temp_key = diff[1]
40
+ if type(diff[1]) == list:
41
+ temp_key = "_".join([str(temp_x) for temp_x in list(diff[1])])
42
+ diff_result['change'][temp_key] = {'orig': diff[2][0], 'new': diff[2][1]}
40
43
 
41
44
  if diff[0] == 'add' or diff[0] == 'remove':
42
45
  for j in range(0, len(diff[2])):
43
- diff_result[diff[0]][diff[2][j][0]] = diff[2][j][1]
46
+ if str(diff[2][j][0]).isdigit():
47
+ diff_result[diff[0]][f"{diff[1]}_{diff[2][j][0]}"] = diff[2][j][1]
48
+ else:
49
+ diff_result[diff[0]][diff[2][j][0]] = diff[2][j][1]
44
50
 
45
51
  final_diff_result = cls.split_keys(diff_result)
46
52
  return Operate(**final_diff_result)
@@ -60,6 +66,7 @@ class Operate(BaseModel):
60
66
  def split_keys(cls, diff_result: Dict):
61
67
  result = {}
62
68
  for key, value in diff_result.items():
69
+ key = str(key)
63
70
  if '.' in key:
64
71
  parts = key.split('.')
65
72
  current_level = result
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: internal
3
- Version: 1.0.57
3
+ Version: 1.0.58
4
4
  Summary:
5
5
  Author: Ray
6
6
  Author-email: ray@cruisys.com
@@ -26,8 +26,8 @@ internal/middleware/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
26
26
  internal/middleware/log_request.py,sha256=bXAxmvvsYDhObXzfUw4ZNreKAWOo8ee_vpb6Xin5ztc,854
27
27
  internal/model/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
28
28
  internal/model/base_model.py,sha256=NS_GZvw_IqU1aZPHPpyQs6A741O34ybmzVzBPm9nGWU,3014
29
- internal/model/operate.py,sha256=YZ-sgCx10ln93haJrgU18oeOvINoy5EnOPw1G3-2c4s,2828
29
+ internal/model/operate.py,sha256=QSM6yXYXpJMwrqkUGEWZLrEBaUgqHwVHY_Fi4S42hKc,3190
30
30
  internal/utils.py,sha256=CXYZs4rDDe33Zac27YeknBE4uQN437ys1YAbW3Xeyow,1517
31
- internal-1.0.57.dist-info/METADATA,sha256=DG-5NYwF3hRZjiTfJlXUnbPiCVX-EY53XBqdaAFLZqo,625
32
- internal-1.0.57.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
33
- internal-1.0.57.dist-info/RECORD,,
31
+ internal-1.0.58.dist-info/METADATA,sha256=rS0yrVwtoPcfWMFuZCSh6ICYsnvpY4_RBKVjUCuSX-E,625
32
+ internal-1.0.58.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
33
+ internal-1.0.58.dist-info/RECORD,,