Skip to content

Commit

Permalink
simplify ntags expression
Browse files Browse the repository at this point in the history
Co-authored-by: Andreas Klöckner <[email protected]>
  • Loading branch information
majosm and inducer authored Jun 12, 2024
1 parent 4d96e18 commit 3b50d35
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pytato/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,9 +465,9 @@ def _is_eq_valid(self) -> bool:
def __attrs_post_init__(self) -> None:
if _ENABLE_TRACEBACK_TAG:
from pytato.tags import CreatedAt
ntags = sum(
1 if isinstance(tag, CreatedAt) else 0
for tag in self.non_equality_tags)
ntags = len(
tag for tag in self.non_equality_tags
if isinstance(tag, CreatedAt))
if ntags < 1:
raise AssertionError("Array has no CreatedAt tag.")
elif ntags > 1:
Expand Down

0 comments on commit 3b50d35

Please sign in to comment.