Skip to content

Commit

Permalink
Remove redundant isinstance check
Browse files Browse the repository at this point in the history
Ref. #291, #409
  • Loading branch information
treiher committed Aug 25, 2020
1 parent 3dd0ed5 commit 3a29a0f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions rflx/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
Pow,
ProofResult,
Relation,
String,
Sub,
ValidChecksum,
ValueRange,
Expand Down Expand Up @@ -1042,7 +1041,7 @@ def resolve_type(expr: Expr) -> Optional[TypeExpr]:

def invalid_relation(left: TypeExpr, right: TypeExpr) -> bool:
return (
(isinstance(left, Opaque) and not isinstance(right, (Opaque, Aggregate, String)))
(isinstance(left, Opaque) and not isinstance(right, (Opaque, Aggregate)))
or (isinstance(left, Array) and not isinstance(right, (Array, Aggregate)))
or (isinstance(left, Aggregate) and not isinstance(right, Composite))
)
Expand Down

0 comments on commit 3a29a0f

Please sign in to comment.