cognite-neat 0.117.7__py3-none-any.whl → 0.117.8__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.
@@ -1,5 +1,4 @@
1
1
  import json
2
- import re
3
2
  from abc import ABC, abstractmethod
4
3
  from collections.abc import Collection
5
4
  from functools import total_ordering
@@ -42,8 +41,8 @@ class WrappedEntity(BaseModel, ABC):
42
41
 
43
42
  # raw filter case:
44
43
  if cls.__name__ == "RawFilter":
45
- if match := re.search(r"rawFilter\(([\s\S]*?)\)", data):
46
- return {"filter": match.group(1), "inner": None}
44
+ if data.startswith("rawFilter(") and data.endswith(")"):
45
+ return {"filter": data[10:-1], "inner": None}
47
46
  else:
48
47
  raise ValueError(f"Cannot parse {cls.name} from {data}. Ill formatted raw filter.")
49
48
 
@@ -193,7 +192,7 @@ class RawFilter(DMSFilter):
193
192
  filter: str
194
193
  inner: None = None # type: ignore[assignment]
195
194
 
196
- def as_dms_filter(self) -> dm.Filter: # type: ignore[override]
195
+ def as_dms_filter(self, default: Any | None = None) -> dm.Filter:
197
196
  try:
198
197
  return dm.Filter.load(json.loads(self.filter))
199
198
  except json.JSONDecodeError as e:
cognite/neat/_version.py CHANGED
@@ -1,2 +1,2 @@
1
- __version__ = "0.117.7"
1
+ __version__ = "0.117.8"
2
2
  __engine__ = "^2.0.4"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: cognite-neat
3
- Version: 0.117.7
3
+ Version: 0.117.8
4
4
  Summary: Knowledge graph transformation
5
5
  License: Apache-2.0
6
6
  Author: Nikola Vasiljevic
@@ -122,7 +122,7 @@ cognite/neat/_rules/models/entities/_loaders.py,sha256=OQDbz5ANMQ_7ZcdMIBdTR94Bo
122
122
  cognite/neat/_rules/models/entities/_multi_value.py,sha256=DNoc0XUhqZhaSXoocJKL6oGOqlv_TB_oqYKp11BmD_c,2762
123
123
  cognite/neat/_rules/models/entities/_single_value.py,sha256=7VBnsnmceaOEPmMnF_bHQz8drflc7pcQYmGC39Vj8Fk,19891
124
124
  cognite/neat/_rules/models/entities/_types.py,sha256=df9rnXJJKciv2Bp-Ve2q4xdEJt6WWniq12Z0hW2d6sk,1917
125
- cognite/neat/_rules/models/entities/_wrapped.py,sha256=DaEfd14m6vLdb51ohSCzlvVGLf3KB70WNJQ23QpkDV4,7767
125
+ cognite/neat/_rules/models/entities/_wrapped.py,sha256=L8ujfOHLQxkUzuJWHgdpPUCaHbjcCdDUiKsyApS7McU,7756
126
126
  cognite/neat/_rules/models/information/__init__.py,sha256=lV7l8RTfWBvN_DFkzea8OzADjq0rZGgWe_0Fiwtfje0,556
127
127
  cognite/neat/_rules/models/information/_rules.py,sha256=eb1_uunWmEnZV0rnuGq7-GyDICJU5yvGrzQNHSGoUKE,13561
128
128
  cognite/neat/_rules/models/information/_rules_input.py,sha256=Pk6DNwDfTUr5DbbuIaFj0ICS9XmwqbhYlaz1d96ouDk,6037
@@ -177,10 +177,10 @@ cognite/neat/_utils/text.py,sha256=qy7lgMdRjzxSYkL8teAnWsq6T5baS_QcezHLK007_7M,7
177
177
  cognite/neat/_utils/time_.py,sha256=7ayUm0OWZm1JDmy32E4ip8WRr2o0GLwrHwJA8sJ43Z4,357
178
178
  cognite/neat/_utils/upload.py,sha256=xWtM6mFuD2QYQHaZ7zCAuGptbEpPIxcH-raWQu93-Ug,5845
179
179
  cognite/neat/_utils/xml_.py,sha256=FQkq84u35MUsnKcL6nTMJ9ajtG9D5i1u4VBnhGqP2DQ,1710
180
- cognite/neat/_version.py,sha256=YaJljgB-To714TXw92iAMOx0O_mDVE8_4374I5hLzUM,46
180
+ cognite/neat/_version.py,sha256=Ydejx2DvPCG9L6Idy1W0y2HPseuQcl4qM2c0WlKLpFU,46
181
181
  cognite/neat/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
182
- cognite_neat-0.117.7.dist-info/LICENSE,sha256=W8VmvFia4WHa3Gqxq1Ygrq85McUNqIGDVgtdvzT-XqA,11351
183
- cognite_neat-0.117.7.dist-info/METADATA,sha256=wPT2i-xQ3VetpDGye8FiVdrRnMRW6vyZnIZ9dxRfUQE,5361
184
- cognite_neat-0.117.7.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
185
- cognite_neat-0.117.7.dist-info/entry_points.txt,sha256=SsQlnl8SNMSSjE3acBI835JYFtsIinLSbVmHmMEXv6E,51
186
- cognite_neat-0.117.7.dist-info/RECORD,,
182
+ cognite_neat-0.117.8.dist-info/LICENSE,sha256=W8VmvFia4WHa3Gqxq1Ygrq85McUNqIGDVgtdvzT-XqA,11351
183
+ cognite_neat-0.117.8.dist-info/METADATA,sha256=0WLULfzc2x04FS1_XNd64mXchfIQoTP2LRWb-M4uGfM,5361
184
+ cognite_neat-0.117.8.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
185
+ cognite_neat-0.117.8.dist-info/entry_points.txt,sha256=SsQlnl8SNMSSjE3acBI835JYFtsIinLSbVmHmMEXv6E,51
186
+ cognite_neat-0.117.8.dist-info/RECORD,,