Skip to content

Commit

Permalink
Use or operator instead of if self.set else
Browse files Browse the repository at this point in the history
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
  • Loading branch information
bleudev and sourcery-ai[bot] authored Nov 10, 2024
1 parent 11f8242 commit 3f1c05e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ufpy/algebra/sets.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def __update__(self):

# Convert to other types
def __repr__(self) -> str:
return f'u{self.set if self.set else '{}'}'
return f'u{self.set or '{}'}'

def __str__(self) -> str:
return repr(self.set) if self.set else '{}'
Expand Down

0 comments on commit 3f1c05e

Please sign in to comment.