pytrilogy 0.0.3.2__py3-none-any.whl → 0.0.3.3__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 pytrilogy might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pytrilogy
3
- Version: 0.0.3.2
3
+ Version: 0.0.3.3
4
4
  Summary: Declarative, typed query language that compiles to SQL.
5
5
  Home-page:
6
6
  Author:
@@ -1,4 +1,4 @@
1
- trilogy/__init__.py,sha256=u47oSxZB2gBUiSNHosZXaS5uhP_ad0NBnUKDXu5UQMw,302
1
+ trilogy/__init__.py,sha256=nHzZPfctd2gKdQ2jsPOuU0higL8uy586PocOwP0TzdY,302
2
2
  trilogy/compiler.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  trilogy/constants.py,sha256=qZ1d0hoKPPV2HHCoFwPYTVB7b6bXjpWvXd3lE-zEhy8,1494
4
4
  trilogy/engine.py,sha256=yOPnR7XCjWG82Gym_LLZBkYKKJdLCvqdCyt8zguNcnM,1103
@@ -19,7 +19,7 @@ trilogy/core/internal.py,sha256=iicDBlC6nM8d7e7jqzf_ZOmpUsW8yrr2AA8AqEiLx-s,1577
19
19
  trilogy/core/optimization.py,sha256=xGO8piVsLrpqrx-Aid_Y56_5slSv4eZmlP64hCHRiEc,7957
20
20
  trilogy/core/query_processor.py,sha256=HyDxBhQsD9KX-Y7pYznlpCAW6AvI76RqPTQNa1mreoE,19450
21
21
  trilogy/core/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
- trilogy/core/models/author.py,sha256=Ai-AFBsr4sbm3T0WE3TxFwB73foGg7-uKUTyQtoBEXQ,67093
22
+ trilogy/core/models/author.py,sha256=ydg1FwMjL58AWsM5cJTB0B8AR8jFaxAZdXfQroiTC0M,67264
23
23
  trilogy/core/models/build.py,sha256=kiq31T8LtUtgmT37m617Q2MlMvQTuAxJzwb6947EiWU,56127
24
24
  trilogy/core/models/build_environment.py,sha256=8UggvlPU708GZWYPJMc_ou2r7M3TY2g69eqGvz03YX0,5528
25
25
  trilogy/core/models/core.py,sha256=yie1uuq62uOQ5fjob9NMJbdvQPrCErXUT7JTCuYRyjI,9697
@@ -92,9 +92,9 @@ trilogy/parsing/render.py,sha256=o_XuQWhcwx1lD9eGVqkqZEwkmQK0HdmWWokGBtdeH4I,178
92
92
  trilogy/parsing/trilogy.lark,sha256=EazfEvYPuvkPkNjUnVzFi0uD9baavugbSI8CyfawShk,12573
93
93
  trilogy/scripts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
94
94
  trilogy/scripts/trilogy.py,sha256=1L0XrH4mVHRt1C9T1HnaDv2_kYEfbWTb5_-cBBke79w,3774
95
- pytrilogy-0.0.3.2.dist-info/LICENSE.md,sha256=5ZRvtTyCCFwz1THxDTjAu3Lidds9WjPvvzgVwPSYNDo,1042
96
- pytrilogy-0.0.3.2.dist-info/METADATA,sha256=buA8GqwIT8kSii6cguT2dMcbI12XMVwQDoQya9jo-Gc,8983
97
- pytrilogy-0.0.3.2.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
98
- pytrilogy-0.0.3.2.dist-info/entry_points.txt,sha256=0petKryjvvtEfTlbZC1AuMFumH_WQ9v8A19LvoS6G6c,54
99
- pytrilogy-0.0.3.2.dist-info/top_level.txt,sha256=cAy__NW_eMAa_yT9UnUNlZLFfxcg6eimUAZ184cdNiE,8
100
- pytrilogy-0.0.3.2.dist-info/RECORD,,
95
+ pytrilogy-0.0.3.3.dist-info/LICENSE.md,sha256=5ZRvtTyCCFwz1THxDTjAu3Lidds9WjPvvzgVwPSYNDo,1042
96
+ pytrilogy-0.0.3.3.dist-info/METADATA,sha256=v5lMZ7w4aJJNsIOCQ0fTTgUkyg37u_SYC7GZAcptleg,8983
97
+ pytrilogy-0.0.3.3.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
98
+ pytrilogy-0.0.3.3.dist-info/entry_points.txt,sha256=0petKryjvvtEfTlbZC1AuMFumH_WQ9v8A19LvoS6G6c,54
99
+ pytrilogy-0.0.3.3.dist-info/top_level.txt,sha256=cAy__NW_eMAa_yT9UnUNlZLFfxcg6eimUAZ184cdNiE,8
100
+ pytrilogy-0.0.3.3.dist-info/RECORD,,
trilogy/__init__.py CHANGED
@@ -4,6 +4,6 @@ from trilogy.dialect.enums import Dialects
4
4
  from trilogy.executor import Executor
5
5
  from trilogy.parser import parse
6
6
 
7
- __version__ = "0.0.3.2"
7
+ __version__ = "0.0.3.3"
8
8
 
9
9
  __all__ = ["parse", "Executor", "Dialects", "Environment", "CONFIG"]
@@ -585,19 +585,23 @@ class Comparison(ConceptArgs, Mergeable, Namespaced, BaseModel):
585
585
  f"Cannot use {self.operator.value} with non-null or boolean value {self.right}"
586
586
  )
587
587
  elif self.operator in (ComparisonOperator.IN, ComparisonOperator.NOT_IN):
588
- right = arg_to_datatype(self.right)
589
- if not isinstance(
590
- self.right, (ConceptRef, Concept, ListType, TupleWrapper)
588
+ right_type = arg_to_datatype(self.right)
589
+ if not any(
590
+ [
591
+ isinstance(self.right, ConceptRef),
592
+ right_type in (DataType.LIST,),
593
+ isinstance(right_type, (ListType, ListWrapper, TupleWrapper)),
594
+ ]
591
595
  ):
592
596
  raise SyntaxError(
593
- f"Cannot use {self.operator.value} with non-list, non-tuple, non-concept object {right} in {str(self)}"
597
+ f"Cannot use {self.operator.value} with non-list, non-tuple, non-concept object {self.right} in {str(self)}"
594
598
  )
595
599
 
596
- elif isinstance(right, ListType) and not is_compatible_datatype(
597
- arg_to_datatype(self.left), right.value_data_type
600
+ elif isinstance(right_type, ListType) and not is_compatible_datatype(
601
+ arg_to_datatype(self.left), right_type.value_data_type
598
602
  ):
599
603
  raise SyntaxError(
600
- f"Cannot compare {arg_to_datatype(self.left)} and {right} with operator {self.operator} in {str(self)}"
604
+ f"Cannot compare {arg_to_datatype(self.left)} and {right_type} with operator {self.operator} in {str(self)}"
601
605
  )
602
606
  elif isinstance(self.right, Concept) and not is_compatible_datatype(
603
607
  arg_to_datatype(self.left), arg_to_datatype(self.right)